| |

VerySource

 Forgot password?
 Register
Search
View: 721|Reply: 7

Related issues of Excel to html conversion

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-12 17:00:01
| Show all posts |Read mode
When converting to HTML, I encountered such a problem that the number in Excel became #### because the grid was too short, and it was not converted when converting to HTML. It was also #####. How to solve this problem La?
Reply

Use magic Report

0

Threads

119

Posts

67.00

Credits

Newbie

Rank: 1

Credits
67.00

 China

Post time: 2020-4-9 16:00:01
| Show all posts
Try to set the cell properties of Excel!
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-9 18:00:01
| Show all posts
When generating html.

<TD sytle = 'mso-number-format:\@'> Content </ td>
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Chile

Post time: 2020-4-9 19:30:01
| Show all posts
Would n’t it be nice to set the width of the Excel cell wide?
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-9 22:15:01
| Show all posts
Is it using excel object to convert html?

Set the format of td to text. Add a 'in front
Reply

Use magic Report

0

Threads

29

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-4-9 23:00:01
| Show all posts
mark
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-4-10 11:00:02
| Show all posts
<TD sytle = 'mso-number-format:\@'> Content </ td>
=============================================
I will directly call the Saveas method without HTML manipulation


Try to set the cell properties of Excel!
==========================
Because it is uploaded as an attachment, how to design the cell attributes

Would n’t it be nice to set the width of the Excel cell wide?
================================================== =========
When the amount of Excel data is large, users cannot set their widths one by one
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-4-12 14:45:01
| Show all posts
// Assume that the second column needs to be widened.
Just find a cell in the second column.

Excel.ApplicationClass el = new Excel.ApplicationClass ();
object o = Type.Missing;
Excel.Workbook book = el.Workbooks.Open ("d:\\aa.xls", o, o, o, o, o, o, o, o, o, o, o, o,
o, o, o, o);
Excel.Worksheet sheet = (Excel.Worksheet) book.Worksheets [1];
The
((Excel.Range) sheet.Cells [1,2]). ColumnWidth = 30;
The
book.SaveAs ("d:\\bb.html", Excel.XlFileFormat.xlHtml, o, o, o, o, Excel.XlSaveAsAccessMode.xlExclusive, o, o, o, o, o);
The
el.Quit ();
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list