Closed totaldmis closed 2 years ago
In addition, the font used in Excel is Chinese Song Ti. Maybe it's an error caused by the font?
That is probably the issue. The scaling calculations for images are based on the font Calibri and size 11.
How are you changing the default font to Song Ti?
Thank you for your reply. My operating system is Chinese Simplified Windows operating system. So I guess the default font of Excel is Chinese Song Ti. I set the default font to Calibri, size 11.
then open "images.xlsx" again, but Chinese Song Ti is still the default font.
when I create a new xlsx document, Excel uses Calibri as the default font.
How can I use Calibri font as the default font to open images.xlsx document?
Transferred issue to the libxlsxwriter Github.
Probably there is some other system setting where the default font is set. Setting the default font in Excel won't change the font when you are reading files.
Can you try with this test file created in Excel and see if you get the same behaviour: https://github.com/jmcnamara/libxlsxwriter/blob/main/test/functional/xlsx_files/image10.xlsx
Any update on this?
Sorry, I haven't noticed your reply these days. I tested your file. It seems that there is still the same problem. Please see my screen copy. Note, this time I am using the Chinese version of Excel. .
That file was created in Excel. So this issue isn't related to libxlsxwriter (which produces the same file and dimensions as Excel).
I don't any good suggestions on how to deal with this:
Any way this isn't a libxlsxwriter issue. Libxlsxwriter has a lot of code and tests to ensure that it inserts images in exactly the same way as Excel.
So, since I cannot help you any further I will close this issue.
Question
Hello Sir, I am using VC2019 to test the "xlsxwriter" library. I compiled the example project and executed the example program "images.exe". The program produced the "images.xlsx" file. When I opened the "images.xlsx" file with Excel 2019, I found There is a problem with the display ratio of the picture in the file. For example, the first picture does not have a zoom ratio set in the program, but it displays 90% width and 110% height in excel. What is the problem?
I am using VC2019 X64, Windows 10 and Excel 2019.
It is the example code and the xlsx file: images.zip
In addition, the font used in Excel is Chinese Song Ti. Maybe it's an error caused by the font?
thank you very much