ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Carriage Return from HTML file (https://www.excelbanter.com/excel-programming/336352-carriage-return-html-file.html)

Edo

Carriage Return from HTML file
 
Hi all, I would like to create xls file via code (C#), and I've thought to
create a simple html file renaming it to xls. That works, but I'm no able to
write return character in a single cell (Alt+Return). If I write 'html
return' (<br), excel creates a new cell, but I would return to be in the
same cell!

Any suggestion?
Thanks a lot
Edo



Tim Williams

Carriage Return from HTML file
 
Are you formatting your output as a table ? Excel normally keeps the conent
of a <td in the same cell.

Try wrapping your multi-line text in a single-cell table.

Tim

--
Tim Williams
Palo Alto, CA


"Edo" wrote in message
...
Hi all, I would like to create xls file via code (C#), and I've thought to
create a simple html file renaming it to xls. That works, but I'm no able

to
write return character in a single cell (Alt+Return). If I write 'html
return' (<br), excel creates a new cell, but I would return to be in the
same cell!

Any suggestion?
Thanks a lot
Edo





Edo

Carriage Return from HTML file
 
Hi Tim, yes, I'm formatting output as a table. Each <tr become a single row
and each '<td' become a single cell; the problem is when I want to insert
'return' character (Alt+Return) in a single cell. I think I need a special
char that will be interpreted as a return by excel...

Thanks,
Edoardo


"Tim Williams" <timjwilliams at gmail dot com wrote in message
...
Are you formatting your output as a table ? Excel normally keeps the
conent
of a <td in the same cell.

Try wrapping your multi-line text in a single-cell table.

Tim

--
Tim Williams
Palo Alto, CA


"Edo" wrote in message
...
Hi all, I would like to create xls file via code (C#), and I've thought
to
create a simple html file renaming it to xls. That works, but I'm no able

to
write return character in a single cell (Alt+Return). If I write 'html
return' (<br), excel creates a new cell, but I would return to be in the
same cell!

Any suggestion?
Thanks a lot
Edo








All times are GMT +1. The time now is 05:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com