Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

Commented Unassigned: Decimal separator is always dot (.) when saving an excel file to text file [21712]

$
0
0
Hello,

NetOffice.ExcelApi.WorkBook.SaveAs(...) ignores my local settings when I save the workbook, e.g, in XlFileFormat.xlCurrentPlatformText format. After the workbook is saved to .txt file the decimal separator is always dot (.) while NetOffice.ExcelApi.Application.DecimalSeparator says that my decimal separator is comma (,).

If I save the workbook to the excel format then it uses the decimal separator defined in the DecimalSeparator property.

Is this a bug or feature that .txt file is always saved by using dot as a decimal separator?

I am using NetOffice 1.7.2 and .NET Framework 4.5

```
NetOffice.ExcelApi.Application excelApplication = new Excel.Application();

var workbook = excelApplication.Workbooks.Open("c:\\example.xlsx");
workbook.SaveAs("c:\\example.txt", XlFileFormat.xlCurrentPlatformText, Type.Missing, Type.Missing, false);
```
Comments: ** Comment from web user: sami_lehtonen **

Hello and thanks,

I tested this with MS Interop assemblies and was able to reproduce it. So this isn't NetOffice's bug.

Sami


Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>