Free Support Forum - aspose.com

Save to text file with encoding

Hi,

is there any possibility to use a specific encoding when writng to a text file?

The Aspose.Cells.TxtSaveOptions has no Encoding attribute like the TxtLoadOptions.

I see only two solutions:

1. using the deprecated Workbook.SaveAs(string strFile, char separator, Encoding encoding) ; method

2. save text to temp file and alter encoding with my own code ( not very good solution)

Thanks in advance, Martin

internal bugid#4946

Hi,


Please use WorkbookSettings.Encoding attribute for your needs.

E.g

workbook.Settings.Encoding = …