hello,
I am trying to write to the excel template via aspose.cell. and it seems Worksheet’s AutoFitColumns don’t work for particular columns.
see the following snapshot, the overlap are hitting on the column B and column G
this is the snapshot from the output after writting the values to the excel template via aspose
image.png (79.8 KB)
After poking around the same issue from web, i was told this might be related to font. the font was hittting this AutoFitColumns issue was “Effra”, and this issue seems only occuring when the input values to cell are uppper English && number string values.
after i changed the font of the excel template to Arial and Calibri , it seems working fine.
see:
image.png (58.8 KB)
so my concern, is this an aspose.cell bug? becuase we already purchased license of aspose.cell, if limited fonts are well supported, that might means much more effort for us.
BTW, my test samples code were attached.
aspose samples.zip (19.9 KB)
@tonyutada
Please check the document Configuring Fonts for Rendering Spreadsheets|Documentation
Please confirm “Effra” is installed on the server and your machine, otherwise we can not calculate the size of the text correctly and MS Excel will show the text with other font.
If you still have problem, could you share “Effra” font here?
thanks, i am not that familar with the fonts. I see the excel show the cell is that font, so I assumed it has that font by default.
so ,what i need to check, whether if the OS has installed that font?
image.png (13.6 KB)
seems not having “Effra” in the OS
image.png (10.2 KB)
@tonyutada
你的机器没有安装Effra Font,你可以搜索目录 C:\Windows\Fonts,windows的字体都安装在这里
1,Effra Font的商用授权方式是商用须授权,这意味着在使用该字体进行商业活动时,必须获得相应的授权。
2, 如果你没法去掉文件中的Effra Font设置, 你需要下载Effra Font,然后安装你的服务器和 本地机器(包括你的所有客户机器)
我们和Excel一样, 如果找不到对应的字体文件, 会查找字体库, 找到一个能显示该字符的字体来替换。
但是我们选中的替换字体不一定和Excel 相同,所以不能得到和Excel一样的字符宽度, 导致Autofitcolumns 的结果和Excel不一致。