In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "js how to write html pages into excel". In daily operation, I believe many people have doubts about how to write html pages into excel in js. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how js writes html pages into excel". Next, please follow the editor to study!
Function MakeExcel () {
Var i,j
Try {
Var xls = new ActiveXObject ("Excel.Application")
}
Catch (e) {
Alert ("to print this form, you must install the Excel spreadsheet software, and your browser must use the ActiveX control, and your browser must allow the control to be executed. Click [help] for browser setup!")
Return ""
}
Xls.visible = true; / / set excel to visible
Var xlBook = xls.Workbooks.Add
Var xlsheet = xlBook.Worksheets (1)
Xlsheet.Range (xlsheet.Cells (1), xlsheet.Cells (1)). Mergecells=true
Xlsheet.Range (xlsheet.Cells (1), xlsheet.Cells (1)) .value = "card issuing record"
/ / xlsheet.Range (xlsheet.Cells (1), xlsheet.Cells (1)). Interior.ColorIndex=5;// sets the background to blue
/ / xlsheet.Range (xlsheet.Cells (1), xlsheet.Cells (1)). Font.ColorIndex=4;// sets the font color
/ / xlsheet.Rows (1) Interior .ColorIndex = 5; / / set the background color to blue and set the background color Rows (1) .Font.ColorIndex=4
Xlsheet.Rows (1) .RowHeight = 25
Xlsheet.Rows (1). Font.Size=14
Xlsheet.Rows (1) .Font.Name = "boldface"
Xlsheet.Columns ("avanza D"). ColumnWidth = 18
Xlsheet.Columns (2) .NumberFormatLocal = "@"
Xlsheet.Columns (7) .NumberFormatLocal = "@"
/ / set cell contents to wrap automatically range.WrapText = true
/ / sets the horizontal alignment of cell contents range.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;// sets the vertical stacking of cell contents
/ / range.VerticalAlignment=Excel.XlVAlign.xlVAlignCenter
/ / range.WrapText = true; xlsheet.Rows (3) .WrapText=true automatic line wrapping
/ / set the title block
Xlsheet.Cells (2). Value = "card number"
Xlsheet.Cells (2) .value = "password"
Xlsheet.Cells (2p3) .value = "billing method"
Xlsheet.Cells (2p4) .value = "valid days"
Xlsheet.Cells (2, 5) .value = "amount"
Xlsheet.Cells (2pc6) .value = "Service items to which it belongs"
Xlsheet.Cells (2, 7) .value = "time to issue cards"
Var oTable=document.all ['fors:data']
Var rowNum=oTable.rows.length
For (iTunes 2)
/ / xlsheet.Range (xlsheet.Cells (I, 4), xlsheet.Cells (iMur1,6). BorderAround, 4
/ / for (mn=1,mn
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.