1 year ago

#389244

test-img

Mike McCoin

In Interop.Excel, the Worksheet.SaveAs has a CSV option. How can I use this if my *.xlsx file has line feeds in some cells (Alt+Enter)

Writing a c# app to digest some old spreadsheets. When reading an Excel file that contains line feeds (by using Alt-Enter while in a cell), I can't seem to use "Worksheet.SaveAs" to save a CSV file. It treats the linefeed as a carriage return and a new cell.

Interop.Excel should recognize the linefeeds and remove them during the save. Sample Table and result

excel

csv

excel-interop

linefeed

0 Answers

Your Answer

Accepted video resources