Cells.PutValue() - Not working?

I have just upgraded to the latest and greatest Aspose.Excel dll - version 2.3.3.0. I am regression testing this against a previously working Excel download - unfortunately there seems to be one big issue. Calling Cells.PutValue(string) doesn’t seem to be consistently writing the string to the desired cell!

I have tried other versions of this overloaded method, such as Cells.PutValue(int). To my dismay, the call is still working to the (int) version of the method, which confirms that Cells.PutValue(string), as basic as it seems, is not functioning at this time. Please, I would greatly appreciately an expeditious follow up to this. Perhaps I am not doing something correct, but, for something that was working prior to upgrading to 2.3.3.0, and still working if I use Cells.PutValue(int), I am strongly led to believe that Cells.PutValue(string) has a serious problem with it.

Does anyone else have this issue?

Thanks
Shan Plourde

More context. to this issue:
1. Trying to use Cell.PutValue(string) to write content to a cell that already contains string content - in this case the string content is in the original Excel template file - the write fails!

I have default content in my Excel template. At times I want to use Cell.PutValue(string) to write overtop of the default values from the Excel template. Otherwise, I want to leave the content from the template as is.

So, I deleted the default content from the Excel template first by editing it directly in Microsoft Word. I then re-ran the Excel download. Aspose.Excel then populated the blank cells with content, rather than contains the string content - so it actually works in that case.

So the issue happens when you try to use Cell.PutValue(string) to write string content to a cell that already contains string content in the original Excel template. Please fix this ASAP, this is a truly urgent and super basic need that I am sure others will require as well!

Thanks
Shan Plourde

Dear Shan,

Thanks for your report. It's really a serious problem. But I did some simple tests and haven't found the problem as you described.

Could you email me your code and template? Thanks.

Hi Laurence, thank you for your fast response. I have emailed to you 4 Excels - 2 are the templates - 1 works (albeit not as I fully need as indicated), the other doesn’t. The other 2 Excels are produced from those two templates using the Aspose.Excel component. I have also mailed you the relevant source code for the issue.

Looking forward to hearing from you soon.

Thanks
Shan Plourde

I had the same experience with the PutValue(string) not working if there was already a string in the cell but I discovered that that particular cell in my Designer File was set to Left(Indent) horizontal alignment with a level of 3.

I added two lines to my code:

oCell.Style.HorizontalAlignment = TextAlignmentType.Left
oCell.Style.IndentLevel = 3

That fixed the problem. I have otherwise used the PutValue(string) method extensively and had no problems with it when the cell was not indented.

Rick Schoenborn

Hi Shan and Rick,

Please download the latest hotfix and have a try.

Hi Laurence, again as usual, thank you very much for the incredibly fast response. This issue does indeed seem to be resolved. I retested with the original Excel that the issue appeared in and it is now working.

Shan Plourde