SpreadsheetML Problem
-
I am trying to create an Excel file with the XMLTextWriter class. I am successfully able to write the excel file with data from dataset in it. But the problem is that the string data being written in Excel is not visible fully in the cells. I tried the option of AutoFitWidth="1", But it does not comes into effect for String data. I also got some clue for using System.Drawing.Graphics.MeasureString method. But I am not able to use it in Web project. Can anyone guide me as to how can I fit the width of the string text in excel cell programatically.
If my mind can conceive it, and my heart can believe it, I know I can achieve it.
-
I am trying to create an Excel file with the XMLTextWriter class. I am successfully able to write the excel file with data from dataset in it. But the problem is that the string data being written in Excel is not visible fully in the cells. I tried the option of AutoFitWidth="1", But it does not comes into effect for String data. I also got some clue for using System.Drawing.Graphics.MeasureString method. But I am not able to use it in Web project. Can anyone guide me as to how can I fit the width of the string text in excel cell programatically.
If my mind can conceive it, and my heart can believe it, I know I can achieve it.
I don't know much about spreadsheetML, but if I recall autofit is a property of the column and not the cell. Are you setting it as a column property? Sorry, but if that doesn't fix the problem I really don't know what will. I don't normally jump into a topic I don't know that well, but since no one else has answered I thought I'd throw my hat in.