Replace method not working


#1

I’m using the Replace method to overlay placeholders in a designer file. It works for several of the cells on the designer but others simple have #value! in the cell. I checked the format of the cells to verify I wasn’t having any datatype issues and I don’t believe that to be the cause. Also, when I open the saved xls file I get a file error, data may be lost. Any ideas on what to check?

Thanks, Donta


#2

Hi Donta,

Could you send me your designer file and you relative code? That may greatly help me to investigate the problem.

Thanks for your cooperation.


#3

I believe I see what is happening. The following code will create the error every time.
exObj.Replace("&Sports",“N”)
exObj.Replace("&News",“N”)
exObj.Replace("&Weather",“N”)
The &Sports placeholder will correcly populate but &News and &Weather will show #Value! in the cell and the spreadsheet has an error. However, if I change the code to the following then everything works properly:
exObj.Replace("&Sports",“N”)
exObj.Replace("&News",“N1”)
exObj.Replace("&Weather",“N2”)

I can send a designer file with these 3 placeholders if it’s required. I just need to know where to send it.

Thanks, Donta


#4

Just send it to excel@aspose.com.


#5

Hi,

It’s fixed. A new hotfix will be released tomorrow.