Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
Cannot set excel cell format
posted

Hi,

I'm getting an exception for halving a string more than 32767 characters when exporting my data from UltraGrid to Excel. To handle this I am creating another worksheet and setting the value on the new worksheet and breaking up into multiple cells to prevent that exception. After creating the new worksheet I am trying copy the first row values and cell format of "Sheet1" to the new sheet. I am able to copy the value but the formatting of the cell does not roll over. I try to set the cell formatting manually using SetFormatting method but nothing changes. I've attached an example excel file on what is happening. DeviceImageAnalyzer.xlsx

Parents
  • 12480
    Offline posted

    Hi Raymond,

    The exception you encounter is intended behavior. Microsoft Excel has a limit of 32,767 characters for a cell, so our engine throws an exception to alert the developer that it will not be possible to store that value in a cell.

    Your workaround of breaking up the data into multiple cells sounds like a good approach to me. SetFormatting should be working to copy the format over. If you can provide the sample code that you're using to copy the format over, I can check into why it is not working as you expect.

Reply Children
No Data