GroupDocsGists
10/19/2017 - 10:58 AM

EncodingExcelDocument.cs

// Setup GroupDocs.Viewer config
ViewerConfig config = Utilities.GetConfigurations();
 
//Initialize viewer handler
ViewerImageHandler viewerImageHandler = new ViewerImageHandler(viewerConfig);
 
//Set encoding
Encoding encoding = Encoding.GetEncoding("shift-jis");
 
 //Set image options
ImageOptions imageOptions = new ImageOptions();
imageOptions.CellsOptions.Encoding = encoding;
 
//Get cells document pages with encoding
string cellsDocumentGuid = "document.csv";
List<PageImage> cellsDocumentPages = viewerImageHandler.GetPages(cellsDocumentGuid, imageOptions););
 
 //Get cells document info with encoding
DocumentInfoOptions cellsDocumentInfoOptions = new DocumentInfoOptions(cellsDocumentGuid);
cellsDocumentInfoOptions.CellsDocumentInfoOptions.Encoding = encoding;
DocumentInfoContainer cellsDocumentInfoContainer = viewerImageHandler.GetDocumentInfo(cellsDocumentInfoOptions);