c# - How can I save an .xlsx file as Unicode text using interop? -
i have build report making desktop application . need user friendly, reports in hebrew has unicode , not regular .csv file or question marks.. want receive file path of report (like c:\folder\file.xlsx) , able save copy of original file in location unicode text file.. help?
same problem this guy.
"i need use saveas() microsoft.office.interop.excel can't figure how "
add this:
using excel = microsoft.office.interop.excel; then use code:
excel.application app = new excel.application(); try { app.displayalerts = false; app.visible = false; excel.workbook book = app.workbooks.open("d:\\test.xlsx"); book.saveas(filename: "d:\\test.txt", fileformat: excel.xlfileformat.xlunicodetext, accessmode: excel.xlsaveasaccessmode.xlnochange, conflictresolution: excel.xlsaveconflictresolution.xllocalsessionchanges); } { app.quit(); } "d:\\test.xlsx" input excel filename , "d:\\test.txt" unicode text output filename.
Comments
Post a Comment