This project has moved and is read-only. For the latest updates, please go here.

Text to Columns

Apr 16, 2013 at 3:41 PM
Edited Apr 17, 2013 at 6:24 PM
Hi everyone,

I'm trying to use Text to columns like in Excel, but I cant find any method to do it.

I read a .csv file using FileInfo, I use LoadFromText to add the text to a worksheet with TextQualifier = '\"'.

in my first column I have some values like 090, C30, 021... and when I open the xlsx file, the leading-zeros disappears :(

so, I put a ' character before column A values (when .csv is created), but now when I open the xlsx file, I see that apostrophe.

Using Office Interop.Excel, I use an Array and "Excel.Selection.TextToColumns", and works fine. But I dont wanna use Office Interop any more.

is there any possibilities to do something like this with EPPlus??.

Pd. I use NumberFormat.Format = "@"; without using the apostrophe but the leading-zeros disappears too.

Hope U can help me :)
Cheers, and thanks for this magnificent tool.