excel

vba: what does ReDim Preserve do and simple array question

i am looking at someone else's vba excel code. they are doing ReDim Preserve dataMatrix(7, i) in both loops. what does this do? also, it seems like the second loop just overwrites the data in the first, loop, is that correct? Dim dataMatrix() As String Worksheets.Item("ETS").Select Do While Trim(Cells(r, 1)) <> "" Debug...

Excel XML Newline in Cell

I am using LINQ to XML to create an Excel XML file. I want to include newlines within the cells. Excel uses the &#10; literal to represent a new line. If I try to add this using an XText: XText newlineElement = new XText( "Foo&#10;Bar" ); I get: Foo&amp;#10;Bar Which shows up in Excel as: Foo&#10;Bar Is there a way to write &#10 t...

ipad saving excel sheet opened in uiwebview

I've few excel sheets and i want to distribut them along with ap. I want to create an application that open those excel sheets, allow user to modify the content and save the excel sheet as new file. For that purpose, I think I can open excel sheets in UIWebView that allows editing as well. But the trouble is, can I save edited Excel shee...

CSV is actually .... Semicolon Separated Values ... (Excel export on AZERTY)

I'm a bit confused here. When I use Excel 2003 to export a sheet to CSV, it actually uses semicolons ... Col1;Col2;Col3 shfdh;dfhdsfhd;fdhsdfh dgsgsd;hdfhd;hdsfhdfsh Now when I read the csv using Microsoft drivers, it expects comma's and sees the list as one big column ??? I suspect Excel is exporting with semicolons because I have ...

Can't read excel file after creating it using File.WriteAllText() function

Hi all, I have created an excel sheet from datatable using function. I want to read the excel sheet programatically using the below connectionstring. This string works fine for all other excel sheets but not for the one i created using the function. I guess it is because of excel version problem. OleDbConnection conn= new OleDbConn...

XMLSS Style Inheritance

I am working on creating Excel workbooks in XML, by way of XMLSS, and I've found myself stuck in one particular place. According to the documentation at http://msdn.microsoft.com/en-us/library/aa140066(office.10).aspx#odc_xmlss_ss:style, the <ss:Style /> tag has an available property, ss:Parent, which allows the given style to inherit t...

to get columns from Excel files using Apache POI??

Hi, In order to do some statistical analysis I need to extract values in a column of an Excel sheet. I have been using the Apache POI package to read from Excel files, and it works fine when one needs to iterate over rows. However I couldn't find anything about getting columns neither in the API (link text) nor through google searching...

how much do these speed up your macro? Application.ScreenUpdating = False Application.DisplayAlerts = False

what is the point of doing these: Application.ScreenUpdating = False Application.DisplayAlerts = False does it really save that much time? ...

C# app that uses Excel Interop, easy switch between 2003 2007?

I have an app written that just does really basic I/O on a spreadsheet. Read in a bunch of cells, do some sorting, and dump the output back into another spreadsheet. Works great on my machine. I have Office 2003 installed. When it runs on someone elses machine with 2007, it bombs, presumably due to the different versions of the Interop ...

C# Best way to read a XLS (XLSX) file and populate a datagrid

Hi all, What is the best (free or paid for) to read Excel files (XLS and XLSX) using C# and populate a datagrid, I would also like to have any changes made in the datagrid be written back to the file. I should also add that it needs to be high performing as the datagrid can contain a significant number of rows (10,000+). This would be...

.NET Excel File Parser

So the company I'm working for is looking for a means to verify that a given .xls/.xlsx file is valid. Which means checking columns and rows and other data. He's having me evaluate GrapeCity Spread and SpreadsheetGear, but I'm wondering if anyone else has any other suggestions of external tools to check out. We don't need a means to ex...

Does *every* Excel interop object need to be released using Marshal.ReleaseComObject?

I've seen several examples where Marshal.ReleaseComObject() is used with Excel Interop objects (i.e., objects from namespace Microsoft.Office.Interop.Excel), but I've seen it used to various degrees. I'm wondering if I can get away with something like this: var application = new ApplicationClass(); try { // do work with application...

Exporting each Excel column to individual text or csv files?

I have an Excel worksheet with around 100 cols. Does anyone know of an easy way to write the contents of each column to a csv or txt file? ...

Learning Excel with a book

I work at a company where all the TMs and assistant TMs use Excel for number management, we're not able to use anything else because the computers are locked down (for good reason though I'll be asking IT anyway). The company also has a buy-a-book scheme, can anybody recommend a good book for using Excel and Macros in it? ...

How do I automatically delete an Excel file after creating it on a server and returning it to the user?

Hello, I am creating an Excel file on a web server, using OleDb to connect the the physical (well as physical as it can be) file and appending records. I am then returning a FilePathResult to the user via MVC, and would like to delete the physical file afterwards due to data protection concerns over the appended records. I have tried u...

excel 2003 can`t edit comments (user)

I have a .xls file of excel 2003. There are a lot of comments. I can`t edit it. right click ->edit comments for example: I have comment: Ludmila: comment goes here Then Ludmila: comment goes here Dezigo:new comment..! I tryed to do: Tools-options-general (change my name to Ludmila),but it`s not work.. Like it Ludmila: comment goe...

excel 2007 unhide sheets

in excel 2007 I have a spread sheet that has hidden sheets. I know all the passwords. To unhide sheets I'm supposed to right click on sheet name tabs on the bottom and click unhide. However the unhide option is greyed out. the hide - unhide under Home > Format is also greyed out. I have a password for the whole sheet, but I don't know ...

Excel VBA File not Found

During development of some Excel vba code about every other iteration where I go in and add some code then save the file, the next time I open the thing (it is automatically set to run the code on open) I get a spurious "File not Found" error. To fix it I copy all the code- modules and classes plus the startup code, to a fresh blank exc...

Globalize/Localize Excel Reports Using Spreadsheet

My company has new customers in Brazil and we realized that our excel reports are not working when our Brazilian customers tried to open the reports in their Brazilian versions of excel. For excel output we use spreadsheet gear in our vb.net web application. Our excel worksheets are fairly simple. Mostly outputted text/numbers/dates, ...

cell data format problem while getting php excell output

Hi everyone,i created an application that takes the excell output of a table.There are long numbers in table cell.When i took the output the cells that have long numbers are seen like that 1234+E34.how can i fix that?Thanks for advance... ...