Hi,
I set ws.Cells.Columns[0].Width = 17;
It works on my Workstation, but when I publish the web application to a server. The resulting Excel file as a column witdh of 16.85.
Any idea?
Regards,
Hi,
I set ws.Cells.Columns[0].Width = 17;
It works on my Workstation, but when I publish the web application to a server. The resulting Excel file as a column witdh of 16.85.
Any idea?
Regards,
Hi Jean,
Hi,
Thank you for your answer.
I use the exact same cells.dll on my Workstation (Windows 10) and on the server (Windows 2003 server). The display settings are the same on both computer (see screenshot below).
So the problem remains the same.
Any other idea?
Regards,
Hi Jean,
Hi,
Thank you for your answer.
I have allready installed the ‘calibri’ font on the server. So the font is installed on both computers.
Then, I think we have to look for another reason.
Maybe another information that can help. in fact, on the server, the columns width is just the next smaller value. For example, if I set 17 in the C# code, the width will be 17 on my Workstation an 16,86 on the server. If I set 45 in C#, the width will be 45 on my Workstation and 44.86 on the server. If I set 7 in C#, the width will be 7 on my Workstation and 6.86 an the server. It is always the next smaller value on the server, whatever value I set.
Just a question about your answer. You tell me that if I set the colomn width like that: ‘ws.Cells.Columns[0].Width = 17;’, in fact the widht can be set of another value depending on the font that is used. Is it right? But I need to set a fixed size to some column. Is it impossible with Aspose product?
Regards,
Hi Jean,
Hi Babar,
Thank you for your answer.
I have made some more testings to write my answer to you, and I don’t have the problem anymore?!?
The only thing that changed is the screen resolution on the server. Indeed, when you asked me to check the font-size settings, I asked the local network administrator to log on physically to the server, to check the settings. As I use remote desktop, I was not sure to see the real settings. He told that the font size was ok (100%). He also told me that he changed the screen resolution from 800600 to 1024768.
So, I think that the low local screen resolution on the server was the explanation for my columns width problem.
Strange isn’t it! What do you think?
Info:
Do not hesitate to contact me if you need further information.
Regards,
Something else. Except when I have joined an image, all the carriage returns have disapeared from my replies in this post.
I use IE 11
Regards,
Enviromatic:Hi Babar,Thank you for your answer.
I have made some more testings to write my answer to you, and I don’t have the problem anymore?!?
The only thing that changed is the screen resolution on the server. Indeed, when you asked me to check the font-size settings, I asked the local network administrator to log on physically to the server, to check the settings. As I use remote desktop, I was not sure to see the real settings. He told that the font size was ok (100%). He also told me that he changed the screen resolution from 800600 to 1024768.
So, I think that the low local screen resolution on the server was the explanation for my columns width problem.
Strange isn’t it! What do you think?
Info:
- I currently use Aspose.cells 7.4.0.0 and target .net Framework is 4
Do not hesitate to contact me if you need further information.
Regards,
Enviromatic:Something else. Except when I have joined an image, all the carriage returns have disapeared from my replies in this post. I use IE 11 Regards,