We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Special Character in charts

OK, it's not a problem to have special characters in cells.

But if you want to use special characters in catagorydata (category axis, see screenshot)?

chart.NSeries.CategoryData = "A3:A7"

How can I solve that problem in Aspose.Cells?

Many thanks.

Martin

Hi Martin,

Well, normally we follow MS Excel standards. Could you give us some details how could you do that manually in MS Excel i.e., formatting only one character in some category axis tick label, we would provide the APIs to do that. I don't find any way to achieve this in MS Excel (97-2003), I think MS Excel does not allow this. I think we can change the default font of category axis tick labels, but it will affect all the labels with all the characters would be converted to the specified font (e.g., Symbol), this is similar to MS Excel bahaviour:

chart.CategoryAxis.TickLabels.Font.Name = "Symbol";

Thank you.

I am using Version 17.3 of the Aspose.Cells .net, and I am having an issue with a sheet name having a value like se d’œ that when we go to the get range for that sheet it returns a range object that is null. If I have the same exact file except with the special character removed, I am able to get the range and the code works as expected. Do you have any suggestions?

@jlr7975,

Thanks for your query.

I have tried to reproduce this scenario using sample workbook having sheet named “se d’œ”. No issue is observed while getting range from this sheet as it returns valid range object.

Please share your sample file and runnable code snippet with us for our testing. We will reproduce the problem and provide our feedback after analysis.

Here is the snippet code that I use:

HttpPostedFile importedFile = txtImport.PostedFile;
var workbook = new Aspose.Cells.Workbook(importedFile.FileName);

foreach (Name name in workbook.Worksheets.Names)
{
	Range range = name.GetRange();
	bool whyIsThereNoRange = false;
	if (range == null)
		whyIsThereNoRange = true;
}

//I seem to hit the whyIsThereNoRange only for that one sheet in file with the unique character

FileToSendToAspose.zip (35.4 KB)

I tested this with the 17.3 version and I downloaded the newest version the 19.2 does the same thing. Not sure if something is set up wrong in the excel file to cause this situation. Otherwise this works great when we don’t have the character. Thank you in advance for your assistance

@jlr7975 ,
We are working on this issue and will write back here once any update is available to provide you.

@jlr7975,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46607 - Null range returned for sheets having name like Maitrise d’œuvre

@jlr7975,

We evaluated your issue further. We found it is not an issue with the product. The name “__iv_grid_worksheet_1060” which refers to ‘[1]Maitrise d’’œuvre’!$A$1:$O$2 in the file does not refer to the worksheet Maitrise d’œuvre, so no range is returned in that case. The worksheet’s name contains the special characters "’"(0x2019) not "'"(0x27), please do not duplicate "’"(0x2019) when setting the formulas, otherwise it means another sheet.

So that character (0x2019) is the french character for an apostrophe on the french keyboard. Are you saying you don’t support multi languages? And that apostrophes have to be the 0x27?

@jlr7975,

Could you check our previous reply again as I have updated it a bit if you can understand it better now.

I am sorry I am confused about your comment where you say when setting the formulas. Are you saying that the range can’t be set with that character of (0x2019) and that it has to be set with the (0x27)? I apologize upfront for the confusion. I understand that you are saying that the __iv_grid_worksheet_1060 has a range set, but it isn’t referring to the worksheet. Just confused as to what the root of the problem is.

@jlr7975,

Sorry for the confusion.

We will get back to you soon and provide more details.

@jlr7975,

See the details against your queries and follow up other points.
1) Are you saying that the range can’t be set with that character of (0x2019) and that it has to be set with the (0x27)?
No. Any character could be set, but please do not duplicate character (0x2019) when setting formulas, otherwise it means some sheet
2) That the __iv_grid_worksheet_1060 has a range set, but it isn’t referring to the worksheet.
Formulas of the range is ‘[1]Maitrise d’’œuvre’!$A$1:$O$2, so the range refers to the worksheet "Maitrise d’’œuvre" in another workbook.

3)Please check the formulas in the attached file. A1’s formula : ='She''et2'!A1 ; A2’s formula : =She’et3!A1
Could you provide your view (in MS Excel) on your machine?

4)Are the range set by Aspose.Cells or MS Excel?
files1.zip (7.1 KB)

4.) We are setting the range through Aspose.Cells:
sheet.Cells.CreateRange(0, 0, nbItems + 1, itemsCols.Count);

I am unable to download this zip file would you be able to make it so I can download it?

@jlr7975,

Thanks for the reply on 4).

You may download the zipped archive here:
https://drive.google.com/open?id=1XUwZ8ySQP8oSyw79qDrz7oTMLbFEn1dF