Getheader returns the command script not text

getheader returns the command script as string

how do i read only text?

This message was posted using Email2Forum by Muhammad Ijaz.

Hi,

Thanks for your posting and using Aspose.Cells.

Aspose.Cells will return the command script of your header text. You will have to parse it yourself to get the header or footer text.

You can split the command script and get the header text e.g

&“Arial Black,Regular”&S&X&K00B0F0This Is Header Text.

Here, you will first split on the basis of $ sign and then you will remove the K00B0F0 part by removing first 7 character from K00B0F0This Is Header Text. It will then give you header text.

Hi,

GetHeader method returns &L&“Verdana,Bold”&14This Is Header Text. There is no $ sign or the K00B0F0 text in the string returned. Is this a new fix done? and should I take a newer version of aspose.cells?

Thanks,

Hi,

Thanks for your posting and using Aspose.Cells.

K00B0F0 is actually for colored header. You will have to parse the command script yourself to get the header text.

Please download and try the latest version: Aspose.Cells for .NET v7.7.0.2 and see how it works at your end.

I have attached the source file which I used to extract the header using Aspose.Cells API.

Please attach your source file so that we could look into this issue further.