Hi,
I have a cell in a worksheet that contains long text (500 characters). It has Word wrap set. The data gets displayed fine if the cell format is General. But if the format is set to Text, then the data gets displayed as #######
Here's the problem. I'm loading data for this cell using an XML Map (by calling ImportXML from VB code). This seems to automatically reset the cell format to text. In the XML Map, I've mapped this field using the following definition:
<xsd:element type="xsd:string" name="COMMENTS"/>
Currently the workaround I've done is to reset the cell format in VB code after importing the XML Map, as follows:
Range("Comments").NumberFormat = "General"
Is there a better way to solve this? I would like to avoid writing this kind of code, if possible.
Thanks,
Sam
I have a cell in a worksheet that contains long text (500 characters). It has Word wrap set. The data gets displayed fine if the cell format is General. But if the format is set to Text, then the data gets displayed as #######
Here's the problem. I'm loading data for this cell using an XML Map (by calling ImportXML from VB code). This seems to automatically reset the cell format to text. In the XML Map, I've mapped this field using the following definition:
<xsd:element type="xsd:string" name="COMMENTS"/>
Currently the workaround I've done is to reset the cell format in VB code after importing the XML Map, as follows:
Range("Comments").NumberFormat = "General"
Is there a better way to solve this? I would like to avoid writing this kind of code, if possible.
Thanks,
Sam
Last edited: