I've got a console app that loads up a datatable; I'd like to export that to an Excel format and attach it to an email that's sent out on a regular basis.
What is the best library to do so that I can pull down for free? I'm working for an academic institution and we don't have a budget for third-party controls.
possible related quest...
This is a very simple question which I am pulling my hair out with. No amount of web searching seems to help!
All I am trying to do is take a standard range on an excel sheet (i.e. a named range, or even A1:F100), and run some sql queries on it, and return a recordset that I can either step through in VBA code, or even just paste into s...
I have some input with a link and I want to open that link. For instance, I have an HTML file and want to find all links in the file and open their contents in an Excel spreadsheet.
...
I have the unfortunate task of having to import data from excel into a database on a regular basis. The table looks something like this:
IssueID References
1234 DocID1<cr>DocID2<cr>DocID3
1235 DocID1
1236 DocID2
1237 DocID2<cr>DocID3
References is a multi-line text field. What I'm trying to do is cr...
Does anyone know the syntax for this? I've been looking everywhere and all I can find is C++ code for this. I'm trying to password protect an excel file programatically using the System.IO.Packaging namespace.
Any ideas?
Additional notes:
I'm NOT using the Excel interop--but instead the System.IO.Packaging namespace to encrypt and...
Duplicate of: What’s the simplest way to import a System.Data.DataSet into Excel?
Using c# under VS2008, we can create an excel app, workbook, and then worksheet fine by doing this:
Application excelApp = new Application();
Workbook excelWb = excelApp.Workbooks.Add(template);
Worksheet excelWs = (Worksheet)this....
The scenario is as follows,
I have a list of options to be filled in one cell, say A1. The options can be filled using Data Validation-List which causes a dropdown to appear in A1. Now I want B1 to contain a dropdown, the entries in which change on the basis of the data in A1.
As a contrieved example, suppose A1 offers the choices Mam...
For eg: I have 50 rows of data. In that 1st row is having names of the students.
I need the code to copy the data from RAM to RAMESH. In between I have 20 rows.
I need the code to copy the rows and paste the same into another sheet.
And It should not ask me for the names. By default, it has to take the names as RAM & RAMESH.
...
I want to use ADO.net to extract some data from an Excel file. This process is pretty well documented on the internet. My catch is that my file has been uploaded by a user, and so exists only as a byte array in memory. For security and performance reasons I would rather not write this file to disk.
Is there a way of constructing a conne...
Does anyone know of resources that can help me export simple contents of a GridView to a native Excel 2007 format (i.e. the OpenOfficeXML format).
I've already seen solutions like Matt Berseth's, and in fact I have been using that for a while, but it comes with an annoying warning produced by Excel 2007 as documented here stemming from...
We have a lot of reports that are generated via VBA & Excel. Only a small percentage of the reports are actual calculations - the majority of the work is sql calls and formatting/writing of cells. The longest of which takes several hours, the majority takes around 20-30 mins each.
The VBA/Excel code plugs into a dll that the VB6 deskt...
I need a script to convert a comma seperated csv file to an excel xls file. I tried a python script online but i couldn't install the correct version of python to install a mod/dependency the script required. What is the best solution?
...
I've found a problem in Excel/VBA in the Worksheet_Change Event. I need to assign Target.Dependents to a Range, but if it has no dependents it brings up an error. I tried testing Target.Dependents.Cells.Count but that didn't work. Any Ideas?
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 OR Target.Depe...
I have a series of stores Queries/tables in an MS Access 2002 database that starts with "RP_". I would like to list those table names in a listbox menu in an MS Excel 2002 spreadsheet. Any ideas on how to do this?
...
I have an excel sheet containing excel chart. I am able to display entier excel sheet on browser using an iframe. However, I only want to display the chart present inside the excel sheet on the browser.
How do I achieve this? I see that it needs Javascript + ActiveX APIs. I tried but couldn't get it to work.
Please see code given belo...
I have copied and pasted some debugging information into an Excel sheet.
However, it contains some "weird" characters in some cells of one column, that should otherwise contain integers only. What would be the easiest way to eliminate such characters using VBA? An example is shown in the list below:
1 **'␁'** <- I'm trying to get rid ...
How do I print only certain tabs in an Excel file.
...
Using Apache POI to generate a document and i'm having a small problem with cell styles, currentlly i'm using:
CellStyle currencyCellStyle=workbook.createCellStyle();
currencyCellStyle.setDataFormat(format.getFormat("$#,##0.00"));
Which works totally fine for positive numbers, however I would like to assign a different style to negati...
A coleague of mine has shown interest in learning a little about vba scripting. Unfortunatelly, I don't have time to show her, and even if I did, I'm horrible at explaining things to people.
Can you recommend a good VBA book for someone who's never done any programming, that is, has a nice easy approach with lots of examples ?
I've chec...
I am parsing through an uploaded excel files (xlsx) in asp.net with c#. I am using the following code (simplified):
string connString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileLocation + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES\";");
OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM [Sheet...