@thomp361 Hello, we will consider adding this feature in the next version, v4.0. My question is, do you only need to add this feature to the /cells/{name} endpoint, or is it required for all convert, export, and saveas statements?
@xuejianzhang Thank you, isAutoFit is really a great feature, takes all the guess work out when converting to Excel to PDF, everything just fits when this feature is set to true.
@thomp361 ,
The Cells Cloud 4.0 Format Conversion APIs now support query extension parameters, including AutoColumnsFit, AutoRowsFit, and more. Please refer to the code example in the SDK .NET library below for implementation details.
CellsApi cellsApi = new CellsApi(Environment.GetEnvironmentVariable("ProductClientId"), Environment.GetEnvironmentVariable("ProductClientSecret"));
ConvertSpreadsheetRequest convertSpreadsheetRequest = new ConvertSpreadsheetRequest();
convertSpreadsheetRequest.Spreadsheet = "EmployeeSalesSummary.xlsx";
convertSpreadsheetRequest.format = "pdf";
convertSpreadsheetRequest.AddExtendQueryParameter("AutoColumnsFit", "true");
using (Stream stream = cellsApi.ConvertSpreadsheet(convertSpreadsheetRequest))
{
using (FileStream fileStream = File.Create(@"C:\EmployeeSalesSummary_AutoColumnsFit.pdf"))
{
fileStream.Position = 0;
stream.CopyTo(fileStream);
fileStream.Close();
}
}