c# - Excel SaveAs changes the date format -
i trying save excel file csv changes date dd/mm/yyyy mm/dd/yyyy. there parameter can add save instruction achieve this?
excelworkbook.saveas(newfilename, microsoft.office.interop.excel.xlfileformat.xlcsv);
i tried add local:=true did not work.
any suggestions appreciated. cells formatted uk dates.
thanks in advance
thanks meehow - had same problem using saveas function convert xlsx file csv, converting cell values found dates uk format -> format.
changing below worked perectly
old: xlsaveasaccessmode.xlexclusive
new: xlsaveasaccessmode.xlnochange
complete code: xlworkbook.saveas(tocsvfile, microsoft.office.interop.excel.xlfileformat.xlcsvwindows, type.missing, type.missing, false, false, microsoft.office.interop.excel.xlsaveasaccessmode.xlnochange, microsoft.office.interop.excel.xlsaveconflictresolution.xllocalsessionchanges, false, type.missing, type.missing, type.missing);
Comments
Post a Comment