question

FinanceMozilor-5248 avatar image
0 Votes"
FinanceMozilor-5248 asked David-9140 Suspended answered

Huge excel file to csv

Hi, I wanted to save a 100k row and 2k column excel file as csv. Unfortunately the saved csv is empty. Is there any way to get this done properly?

office-excel-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

erinding-msft avatar image
0 Votes"
erinding-msft answered erinding-msft commented

Hi @FinanceMozilor-5248

Could you please tell me what version of Office you are using?

Does this issue occur on this specific csv file or all?
You could create a new simple csv file to check.

If this specific csv file, how did you open it? Will it be opened successfully on another PC?
If you double-click it to open, please try to open Excel, then go to File>Open, in Browse, choose the csv file, click the drop-down button on the right side of the Open button, and select Open and Repair to check this issue.
78072-image.png

If all csv file, please try the following.
1. Press Win+R to open Run. Type regedit in it, Enter.
2. Navigate to the following three path.
HKEY_CLASSES_ROOT\Excel.csv\shell\Open\command
HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\command
HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command
Modify their Value data, change the value /dde at the end to be "%1".
Note: please back up registry before modifying.

Before:
"C:\Program Files\Microsoft Office\Root\Office16\EXCEL.EXE" /dde
After:
"C:\Program Files\Microsoft Office\Root\Office16\EXCEL.EXE" "%1"

Take the first path as an example.
78042-image.png
77944-image.png

Besides, you could also open Excel in safe mode to eliminate interference from add-ins and startup items, then open csv file.
- Press Win+R, type excel /safe in Run, Enter.

If you could open csv file successfully when opening Excel in safe mode:
- Move the files in C:\Users\<User Name>\AppData\Roaming\Microsoft\Excel\XLSTART to other location temporarily, then check if the issue still exists.
- If still exists, please go to File>Options>Add-Ins. Towards the bottom of the window, where it says Manage, select COM Add-ins, click Go. In the dialog box, uncheck the add-ins to disable them.
Then close and restart Excel to see if the issue is resolved.

Any updates, please let me know.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


image.png (231.1 KiB)
image.png (66.2 KiB)
image.png (6.6 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@FinanceMozilor-5248
How is your issue going now?
Is my reply helpful?

0 Votes 0 ·
David-9140 avatar image
0 Votes"
David-9140 Suspended answered

Try Spire.XLS. You can install it into your visual studio via NuGet and then use the following code to convert Excel (xls or xlsx) to CSV format files.

 using Spire.Xls;
    
 namespace ToCSV
 {
     class Program
     {
         static void Main(string[] args)
         {
             Workbook workbook = new Workbook();
             workbook.LoadFromFile(@"..\Excel.xlsx");
             Worksheet sheet = workbook.Worksheets[0];
             sheet.SaveToFile("result.csv", ",", Encoding.UTF8);
         }
     }
 }



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.