Extract Rich Text Field from excel

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Extract Rich Text Field from excel

savan raiyani
Hi,

I am trying to fetch Rich text data from excel(data with applied styling like bold,italic,hyperlink etc.) and storing it as a RichTextString object but I am getting plain String object.

Do we have any way to keep and store styling of data and send it upfront?

If  I enter data with HTML tags in excel then I am getting styled data. Is this a only way to fetch Rich text data from excel?

Thanks in advance.

Regards
Savan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Extract Rich Text Field from excel

Jörn Franke
Can you provide a code snippet on how you get the  RichtextString? Maybe also a link (not attachment) to a formatted Excel to reproduce the problem?
It will facilitate troubleshooting significantly.

> Am 08.10.2019 um 21:06 schrieb savan raiyani <[hidden email]>:
>
> Hi,
>
> I am trying to fetch Rich text data from excel(data with applied styling like bold,italic,hyperlink etc.) and storing it as a RichTextString object but I am getting plain String object.
>
> Do we have any way to keep and store styling of data and send it upfront?
>
> If  I enter data with HTML tags in excel then I am getting styled data. Is this a only way to fetch Rich text data from excel?
>
> Thanks in advance.
>
> Regards
> Savan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Extract Rich Text Field from excel

Axel Howind-3
In reply to this post by savan raiyani
Hi,

you have to use [Cell.getRichStringCellValue()](https://poi.apache.org/apidocs/dev/org/apache/poi/ss/usermodel/Cell.html#getRichStringCellValue--). But I think questions like this rather belong in the [POI user list](https://lists.apache.org/list.html?user@...).

Axel

On 2019/10/08 11:40:54, savan raiyani <[hidden email]> wrote:

> Hi,
>
> I am trying to fetch Rich text data from excel(data with applied styling like bold,italic,hyperlink etc.) and storing it as a RichTextString object but I am getting plain String object.
>
> Do we have any way to keep and store styling of data and send it upfront?
>
> If  I enter data with HTML tags in excel then I am getting styled data. Is this a only way to fetch Rich text data from excel?
>
> Thanks in advance.
>
> Regards
> Savan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Extract Rich Text Field from excel

savan raiyani
In reply to this post by Jörn Franke
To reproduce excel data you can simply apply styling(bold,italic,hyperlink ,etc) to any cell data of excel
I am using Cell.getStringCellValue() to get that styled data but unfortunately getting plain string.

On 2019/10/08 12:55:34, Jörn Franke <[hidden email]> wrote:

> Can you provide a code snippet on how you get the  RichtextString? Maybe also a link (not attachment) to a formatted Excel to reproduce the problem?
> It will facilitate troubleshooting significantly.
> > Am 08.10.2019 um 21:06 schrieb savan raiyani <[hidden email]>:
> >
> > Hi,
> >
> > I am trying to fetch Rich text data from excel(data with applied styling like bold,italic,hyperlink etc.) and storing it as a RichTextString object but I am getting plain String object.
> >
> > Do we have any way to keep and store styling of data and send it upfront?
> >
> > If  I enter data with HTML tags in excel then I am getting styled data. Is this a only way to fetch Rich text data from excel?
> >
> > Thanks in advance.
> >
> > Regards
> > Savan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Extract Rich Text Field from excel

savan raiyani
In reply to this post by Jörn Franke
Here just small correction to my previous reply,my apologies.
To reproduce excel data you can simply apply styling(bold,italic,hyperlink ,etc) to any cell data of excel
I am using Cell.getRichStringCellValue() to get that styled data but unfortunately getting plain string.

On 2019/10/08 12:55:34, Jörn Franke <[hidden email]> wrote:

> Can you provide a code snippet on how you get the  RichtextString? Maybe also a link (not attachment) to a formatted Excel to reproduce the problem?
> It will facilitate troubleshooting significantly.
> > Am 08.10.2019 um 21:06 schrieb savan raiyani <[hidden email]>:
> >
> > Hi,
> >
> > I am trying to fetch Rich text data from excel(data with applied styling like bold,italic,hyperlink etc.) and storing it as a RichTextString object but I am getting plain String object.
> >
> > Do we have any way to keep and store styling of data and send it upfront?
> >
> > If  I enter data with HTML tags in excel then I am getting styled data. Is this a only way to fetch Rich text data from excel?
> >
> > Thanks in advance.
> >
> > Regards
> > Savan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]