@ottap
Through our research, we found that data truncation is caused by automatic row height setting. So you need to call method Worksheet.AutoFitRows(true) to automatically adjust the row height. Please refer to the following API.
Please change the following code:
var sheetRender = new SheetRender(worksheet, imageOptions);
To:
worksheet.AutoFitRows(true);
var sheetRender = new SheetRender(worksheet, imageOptions);
Thanks for reply. Unfortunately that will not work for our other tables where user do not want to display more then what is seen inside the column with width set as they did.
Since our tool does not know what was intent of user we can not apply this automatic resize to get desired results as we believe that desired results is what user see in excel.
We do not want to apply any transformation to sheet, we would like to get it as is is displayed in Excel.
In your template Excel file, there are rows with the auto (height) attribute (on), which means that when the file is opened in MS Excel manually, the height will adjust automatically. Please note that using AutoFitRows(true) will only modify or increase the height of rows that are with auto tag on, so you can utilize this option (in code) without affecting the height of other rows in the worksheet that are not auto enabled.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.