Cell Color Change

Hello,

I have a script that opens a workbook, modifies a couple cell values, then saves it. When I open the saved xls document, it changed the cell background color and font colors. Is there a specific list of available colors, or do I need to set something in code?

Thanks,
Mike

Hi Mike,

Could you give us sample code to reproduce the issue you have mentioned. Also, provide us the template file here. We will check it soon.

Thank you.

Hi Amjad,

Here is my code - an xls sample template is attached. If you open it, the color is light blue. Run it through the code and it comes out light purple.




<!— set the aspose license —>

<cfset LicfileI = LicFile.init(JavaCast(“string”,“D:\Inetpub\wwwroot\Intranet\Aspose.Cells.lic”))>

<cfset license.setLicense(LicfileI)>



<cfset workbook=CreateObject(“java”, “com.aspose.cells.Workbook”).init()>

<cfset open = workbook.open(“D:\Inetpub\wwwroot\Intranet\twg\templates\test_color.xls”)>



<cfset sheet= worksheets.getSheet(“SETTINGS-CONTROLS”)>




<cfset cell.setValue(“CUSTOMER NAME”)>

<cfset cell.setValue(“COMPANY NAME”)>

<cfset cell.setValue(“Job_Name”)>

<cfset cell.setValue(“Proposal_Date”)>

<cfset cell.setValue(“KP_Opportunity”)>


<cfset workbook.save(“D:\Inetpub\wwwroot\Intranet\testtwg\sales_reports\reports\temp\testing.xls”)>


<!— Tell the browser to expect an Excel file attachment. —>
<cfheader
name=“content-disposition”
value=“attachment; filename=testing.xls”
/>

<cfcontent
type=“application/msexcel”
file="#ExpandPath( ‘./temp/testing.xls’ )#"
deletefile=“true”
reset=“true”
/>

Hi,

We found the issue after an initial test.

We have logged your issue into our issue tracking system with an issue id: CELLSJAVA-14919. We will figure it out and get back to you soon.

Thank you.

Hi,

To further update you, your issue is because your .xls file was generated by Excel2007 or
later. In this xls file there are some extended records that are introduced by the new
version of Excel and not supported by Aspose.Cells for Java currently. We will
try to support such records before the end of this month. Before that, as a workaround I think you can use excel2007 file formats instead as the input and output files.

Thank you.

Thanks Amjad,

I did some testing and I can’t use xlsx, as we are using macros. When I attempted to use xlsm, it stripped out all formatting. Are there any workarounds for macros?

Thanks,
Mike

Hi,

Well, we think in that case, please wait until we support those extended records for implementing custom colors. We will try to provide the feature before the end of this month.

Thank you.

Hi Amjad,

Is there any update on this issue?

Thanks,
Mike

Hi Mike,

We will update your soon.

Thank you.

Hi Amjad,

Any updates on this issue? Sorry to keep asking, but it would be a huge win to get this fix into our system.

Thanks,
Mike

Hi

Hopefully, we will provide a fix for it before the end of next week.

Thanks for your understanding!

The issues you have found earlier (filed as 14919) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

EXCELLENT! Thank you!