excel

How can columns be set to 'autosize' in Excel documents created with NPOI?

NPOI is a .NET port of the Java POI project, which allows one to read and write Microsoft Excel documents (as well as other Office formats). NPOI 1.2.2 has introduced support for 'autosizing' columns, whereby the column is set to the width of the widest cell entry in the column. However, there are many reports that this does not work. So...

A form that writes to excel

I was wondering what the easiest way to write a simple form program or web page that will output to a text file that can be opened in excel easily. I know how to write in C++ but I dont know any GUI and I wanted a simple form. I was thinking I could just write an HTML/PHP page but it has to be able to run without the internet, but I dont...

Crystal reports export to excel cell merge issue

When I export from Crystal reports any fields that are marked as "Can Grow" are merged with an otherwise blank row below them. This completely messes up my sorting, how can I resolve this? ...

enumerate queries in sheets of an excel workbook

I need a vba macro to enumerate the queries on each worksheet of a workbook. Can you provide example code? Jerry E ...

How to force SQL Server 2008 express import from Excel to a specific data type?

Hi, I'd like to force SQL Management Studio - Import Data - from XLS excel file to read one column as specific data type? It does a type guessing. My first N rows contain decimal data, but some later columns have also characters in there. I know I need to specify IMEX=1 in the connection string to the XLS file, but as far as I know this ...

Excel 2003 macro that copies a line in a newly created workbook

I would like to copy the first line of each worksheet from workbook A to a newly created workbook(workbook B). And the second line in the second worksheet of workbook B and so on until all the lines are copied. Can you tell me how to do that? ...

CSV file creation without exponential numbers

Hello Everyone, How do you get around the exponential conversion that takes place when inserting a value into a csv file. I have a process that creates a csv file and then starts entering rows into it. One of those fields inside a row inserts a value similar to this: 123,45,45,466,6656,23423,2455,234,2454 These are just a string of i...

Loop this Excel Macro ?

Hi Guys, I have this macro Sub Search() Range("H2").Select ActiveCell.FormulaR1C1 = "=IF(ISNUMBER(SEARCH(R16C6,RC[4])),RC[2],"""")" ' Edit RXX value Range("H2").Select Selection.AutoFill Destination:=Range("H2:H385") Range("H2:H385").Select Range("G16").Select ' Edit GXX value ActiveCell.FormulaR1C1 = "=SpecialConcatenate(C[1])" Range...

How to handle a Ctrl+ keypress event in Excel VSTO?

I would like to be able to handle a Ctrl+x keypress event from within Excel (where x can be any defined key), such that the keypress will invoke a VSTO method on the worksheet which does some calculations and then sets a value in the currently selected cell. I haven't been able to find an event to handle this in VSTO (there seem to be m...

How to locate and access named ranges (global, nd per-worksheet) using xlrd, Python?

The documentation for xlrd here http://www.python-excel.org/ mentions that it is now possible in latest version, but does not say how. ...

How to upload Excel or CSV to MySQL data base using PHP?

I have an Excel file containing data(list of Phone numbers), and i want that data from, Excel file to be imported in to my Database table(for example called phonenumber_list) using PHP code? i know how to convert MySQl in to Excel, but can it possible in reverse? Please Help! ...

Export data from Access to Excel without losing leading zeroes

I have a table in Access I am exporting to Excel, and I am using VBA code for the export (because I actually create a separate Excel file every time the client_id changes which creates 150 files). Unfortunately I lose the leading zeroes when I do this using DoCmd.TransferSpreadsheet. I was able to resolve this by looping through the re...

JAVA - Out Of Memory Error while writing Excel Cells in jxl

I am using JXL to write an excel file of 50000 rows and 30 columns. My code looks like this: for (int j = 0; j < countOfRows; j++) { myWritableSheet.addCell(new Label(0, j, myResultSet.getString(1), myWritableCellFormat)); myWritableSheet.addCell(new Label(1, j, myResultSet.getString(2), myWritableCellFormat)); ..... ..... } Whil...

pass parameter to KPI web part

Hi, I have an excel pivot table like this: Report Filter: Project ID proj_name Status A 70 B 60 C 80 I have this workbook published onto Sharepoint server through excel services. On the site i have a choice filter that has all the project ID's. I am able to show this table in a web part and f...

excel - get url from linked text

I need to copy a column that has linked text and paste a column that shows all the URL’s for the linked text ...

Exporting Excel Rows As Individual XML Files

I don't believe Excel supports this and I've been struggling to find an add-on or program that can help. I'm trying to export individual rows (records) from a worksheet into multiple XML files. I can get Excel to export all of the rows into one XML file. This time I only need to do 100 files, so I don't mind cutting and pasting but I wou...

System.ServiceModel.CommunicationException: Silverlight application reading excel data by excel service.

Hi all, I create a c# console project to read the excel document on the sharepoint server, everything works fine. The problem is when I try to read the excel file data in a silverlight application, a exception popped up as below: {System.ServiceModel.CommunicationException: An error occurred while trying to make a request to URI 'http:...

Export to excel - Issue on Windows Server 2008 IIS7

I am trying to export to repeter/Gridview in excel, this is working fine in my local machine and windows server 2003, however when I deployed on Windows server 2008 its not working properly. here is my code StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); string attachment = "attachment; fil...

Windows Powershell 2.0 - How can I read ODBC from a System DSN into Excel 2007 worksheet

I see in the Excel documentation the QueryTables collection and ODBCConnection object, but not how to use them in powershell. I want to create a new workbook with a single worksheet, connect to a System DSN (doesn't need login/passowrd), and run "SELECT * FROM someTable" and have the results go into the worksheet. Excel is 2007; powers...

Creating an Excel Workbook via OLEDB without headers

I have a C# program to write to Excel which is to support files without headers and files with. If I write where I want headers, this is fine, but in the case of reading a file without headers, I then want to write a table without headers. If I use the same headings to create a table, I still get F1, F2, F3 etc in the content. My conne...