Copy cell of Excel with format

Hi,

I want to preserve the format of the text copied from an excel and paste it to a Application(e.g. Notepad).

Text is:

REFERENCE PR/SC NO.:
12345678

USAGE:
XYZ Plant

DELIVERY LEAD TIME:
Approximately 7 days upon receipt of purchase order

DELIVERY ADDRESS:
ABC

NOTE:
Please send your confirmation notice immediately to (abc.xyz@cba.com).
For your strict compliance.

Can anyone please help me with this?

@shivangi_mishra, :Guess:
Reading the cell value from excel wont create an impact on text format (Alignment).

Regards,
Dominic :slight_smile:

It’s not working :confused:

@shivangi_mishra, How do you get the output ?

Regards,
Dominic :slight_smile:

I have tried both Read Cell and and getting the output in Data table by read Range then writing it to text file. When I write it to Output it is giving me the correct format but when I tried by even splitting the text…there is no new line Surprisingly

Hi @shivangi_mishra,

Send your xaml file and input file
Your expected out put file

I solved this… solution below

char te = New Char() {"a"c, "b"c}
te(0) = CChar(vbLf)
te(1) = CChar(vbCr)
string splittext = outDT.Rows(0)(15).ToString.Split(te, StringSplitOptions.None)
foreach(item in splittext )
{
In Type Into
item + Environment.NewLine
}