ASP导出Excel数据的四种方法

简介:  一、使用OWC   什么是OWC?   OWC是Office Web Compent的缩写,即Microsoft的Office Web组件,它为在Web中绘制图形提供了灵活的同时也是最基本的机制。

 一、使用OWC

  什么是OWC?

  OWC是Office Web Compent的缩写,即Microsoft的Office Web组件,它为在Web中绘制图形提供了灵活的同时也是最基本的机制。在一个intranet环境中,如果可以假设客户机上存在特定的浏览器和一些功能强大的软件(如IE5和Office 2000),那么就有能力利用Office Web组件提供一个交互式图形开发环境。这种模式下,客户端工作站将在整个任务中分担很大的比重。

  1 img_a6339ee3e57d1d52bc7d02b338e15a60.gif <% Option   Explicit  
  2 img_a6339ee3e57d1d52bc7d02b338e15a60.gifClass ExcelGen 
  3 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Private  objSpreadsheet 
  4 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Private  iColOffset 
  5 img_a6339ee3e57d1d52bc7d02b338e15a60.gif
  6 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Private  iRowOffset 
  7 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Sub  Class_Initialize() 
  8 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Set  objSpreadsheet  =  Server. CreateObject ( " OWC.Spreadsheet "
  9 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiRowOffset  =   2  
 10 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiColOffset  =   2  
 11 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End Sub  
 12 img_a6339ee3e57d1d52bc7d02b338e15a60.gif
 13 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Sub  Class_Terminate() 
 14 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Set  objSpreadsheet  =   Nothing   ' Clean up 
 15 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End Sub  
 16 img_a6339ee3e57d1d52bc7d02b338e15a60.gif
 17 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Public   Property   Let  ColumnOffset(iColOff) 
 18 img_a6339ee3e57d1d52bc7d02b338e15a60.gif If  iColOff >  0   then  
 19 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiColOffset  =  iColOff 
 20 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Else  
 21 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiColOffset  =   2  
 22 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End   If  
 23 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End Property  
 24 img_a6339ee3e57d1d52bc7d02b338e15a60.gif
 25 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Public   Property   Let  RowOffset(iRowOff) 
 26 img_a6339ee3e57d1d52bc7d02b338e15a60.gif If  iRowOff >  0   then  
 27 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiRowOffset  =  iRowOff 
 28 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Else  
 29 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiRowOffset  =   2  
 30 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End   If  
 31 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End Property   Sub  GenerateWorksheet(objRS) 
 32 img_a6339ee3e57d1d52bc7d02b338e15a60.gif ' Populates the Excel worksheet based on a Recordset's contents 
 33 img_a6339ee3e57d1d52bc7d02b338e15a60.gif' Start by displaying the titles 
 34 img_a6339ee3e57d1d52bc7d02b338e15a60.gif If  objRS.EOF  then   Exit   Sub  
 35 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Dim  objField, iCol, iRow 
 36 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiCol  =  iColOffset 
 37 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiRow  =  iRowOffset 
 38 img_a6339ee3e57d1d52bc7d02b338e15a60.gif For   Each  objField in objRS.Fields 
 39 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Cells(iRow, iCol).Value  =  objField.Name 
 40 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Columns(iCol).AutoFitColumns 
 41 img_a6339ee3e57d1d52bc7d02b338e15a60.gif ' 设置Excel表里的字体 
 42 img_a6339ee3e57d1d52bc7d02b338e15a60.gif objSpreadsheet.Cells(iRow, iCol).Font.Bold  =   True  
 43 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Cells(iRow, iCol).Font.Italic  =   False  
 44 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Cells(iRow, iCol).Font.Size  =   10  
 45 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Cells(iRow, iCol).Halignment  =   2   ' 居中 
 46 img_a6339ee3e57d1d52bc7d02b338e15a60.gif iCol  =  iCol  +   1  
 47 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Next   ' objField 
 48 img_a6339ee3e57d1d52bc7d02b338e15a60.gif' Display all of the data 
 49 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Do   While   Not  objRS.EOF 
 50 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiRow  =  iRow  +   1  
 51 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiCol  =  iColOffset 
 52 img_a6339ee3e57d1d52bc7d02b338e15a60.gif For   Each  objField in objRS.Fields 
 53 img_a6339ee3e57d1d52bc7d02b338e15a60.gif If   IsNull (objField.Value)  then  
 54 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Cells(iRow, iCol).Value  =   ""  
 55 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Else  
 56 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Cells(iRow, iCol).Value  =  objField.Value 
 57 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Columns(iCol).AutoFitColumns 
 58 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Cells(iRow, iCol).Font.Bold  =   False  
 59 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Cells(iRow, iCol).Font.Italic  =   False  
 60 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjSpreadsheet.Cells(iRow, iCol).Font.Size  =   10  
 61 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End   If  
 62 img_a6339ee3e57d1d52bc7d02b338e15a60.gifiCol  =  iCol  +   1  
 63 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Next   ' objField 
 64 img_a6339ee3e57d1d52bc7d02b338e15a60.gif objRS.MoveNext 
 65 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Loop  
 66 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End Sub   Function  SaveWorksheet(strFileName) 
 67 img_a6339ee3e57d1d52bc7d02b338e15a60.gif
 68 img_a6339ee3e57d1d52bc7d02b338e15a60.gif ' Save the worksheet to a specified filename 
 69 img_a6339ee3e57d1d52bc7d02b338e15a60.gif On   Error   Resume   Next  
 70 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Call  objSpreadsheet.ActiveSheet.Export(strFileName,  0
 71 img_a6339ee3e57d1d52bc7d02b338e15a60.gifSaveWorksheet  =  (Err.Number  =   0
 72 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End Function  
 73 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End  Class 
 74 img_a6339ee3e57d1d52bc7d02b338e15a60.gif
 75 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Dim  objRS 
 76 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Set  objRS  =  Server. CreateObject ( " ADODB.Recordset "
 77 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjRS.Open  " SELECT * FROM xxxx " " Provider=SQLOLEDB.1;Persist Security 
 78 img_a6339ee3e57d1d52bc7d02b338e15a60.gif
 79 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Info = True ;User ID = xxxx;Password = xxxx;Initial Catalog = xxxx;Data source = xxxx; "  
 80 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Dim  SaveName 
 81 img_a6339ee3e57d1d52bc7d02b338e15a60.gifSaveName  =  Request.Cookies( " savename " )( " name "
 82 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Dim  objExcel 
 83 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Dim  ExcelPath 
 84 img_a6339ee3e57d1d52bc7d02b338e15a60.gifExcelPath  =   " Excel\ "   &  SaveName  &   " .xls "  
 85 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Set  objExcel  =   New  ExcelGen 
 86 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjExcel.RowOffset  =   1  
 87 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjExcel.ColumnOffset  =   1  
 88 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjExcel.GenerateWorksheet(objRS) 
 89 img_a6339ee3e57d1d52bc7d02b338e15a60.gif If  objExcel.SaveWorksheet(Server.MapPath(ExcelPath))  then  
 90 img_a6339ee3e57d1d52bc7d02b338e15a60.gif ' Response.Write "<html><body bgcolor='gainsboro' text='#000000'>已保存为Excel文件. 
 91 img_a6339ee3e57d1d52bc7d02b338e15a60.gif
 92 img_a6339ee3e57d1d52bc7d02b338e15a60.gif<a href = ' " & server.URLEncode(ExcelPath) & "'>下载</a>" 
 93 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Else  
 94 img_a6339ee3e57d1d52bc7d02b338e15a60.gifResponse.Write  " 在保存过程中有错误! "  
 95 img_a6339ee3e57d1d52bc7d02b338e15a60.gif End   If  
 96 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Set  objExcel  =   Nothing  
 97 img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjRS.Close 
 98 img_a6339ee3e57d1d52bc7d02b338e15a60.gif Set  objRS  =   Nothing  
 99 img_a6339ee3e57d1d52bc7d02b338e15a60.gif%>  
100 img_a6339ee3e57d1d52bc7d02b338e15a60.gif
101 img_a6339ee3e57d1d52bc7d02b338e15a60.gif

  二、用Excel的Application组件在客户端导出到Excel或Word

  注意:两个函数中的“data“是网页中要导出的table的 id

<input type="hidden" name="out_word" onclick="vbscript:buildDoc" value="导出到word" class="notPrint">
<input type="hidden" name="out_excel" onclick="AutomateExcel();" value="导出到excel" class="notPrint"> 

 

img_a6339ee3e57d1d52bc7d02b338e15a60.gif <SCRIPT LANGUAGE = " javascript " > 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
!--  
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
function  AutomateExcel() 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
//  Start Excel and get Application object. 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
var  oXL  =   new  ActiveXObject( " Excel.Application " ); 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
//  Get a new workbook. 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
var  oWB  =  oXL.Workbooks.Add(); 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
var  oSheet  =  oWB.ActiveSheet; 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
var  table  =  document.all.data; 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
var  hang  =  table.rows.length; 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
var  lie  =  table.rows( 0 ).cells.length; 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
//  Add table headers going cell by cell. 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
for  (i = 0 ;i<hang;i ++
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
for  (j = 0 ;j<lie;j ++
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gifoSheet.Cells(i
+ 1 ,j + 1 ).value  =  table.rows(i).cells(j).innerText; 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gifoXL.Visible 
=   true
img_a6339ee3e57d1d52bc7d02b338e15a60.gifoXL.UserControl 
=   true
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
// --> 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
/ SCRIPT>  
img_a6339ee3e57d1d52bc7d02b338e15a60.gif

2. 导出到Excel代码

<script language="javascript">
function exportExcel(atblData)
{
 if (typeof(EXPORT_OBJECT)!="object")
   {
     document.body.insertAdjacentHTML("afterBegin","<OBJECT style='display:none' classid=clsid:0002E510-0000-0000-C000-000000000046 id=EXPORT_OBJECT></Object>");
   }
 with (EXPORT_OBJECT){
          DataType = "HTMLData";
          HTMLData =atblData.outerHTML;
      try{
           ActiveSheet.Export("C:\\sortTEL.xls",0);
  alert('导出EXCEL文档完毕');
          }
  catch (e)
  {
               alert('导出Excel表失败,请确定已安装Excel2000(或更高版本),并且没打开同名xls文件');
  }
            }
 }
</script>
<center><input type="button" value="导出以上数据为Excel文档" onclick="exportExcel(tblData)"></center>

 

  导出到Word代码

img_a6339ee3e57d1d52bc7d02b338e15a60.gif <script language = " vbscript " > 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifSub buildDoc 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifset table 
=  document.all.data 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifrow 
=  table.rows.length 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifcolumn 
=  table.rows( 1 ).cells.length 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gifSet objWordDoc 
=  CreateObject( " Word.Document "
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjWordDoc.Application.Documents.Add theTemplate, False 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjWordDoc.Application.Visible
= True 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gifDim theArray(
20 , 10000
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
for  i = 0  to row - 1  
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
for  j = 0  to column - 1  
img_a6339ee3e57d1d52bc7d02b338e15a60.giftheArray(j
+ 1 ,i + 1 =  table.rows(i).cells(j).innerTEXT 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifnext 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifnext 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjWordDoc.Application.ActiveDocument.Paragraphs.Add.Range.InsertBefore(
" 综合查询结果集 " // 显示表格标题 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif

img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjWordDoc.Application.ActiveDocument.Paragraphs.Add.Range.InsertBefore(
""
img_a6339ee3e57d1d52bc7d02b338e15a60.gifSet rngPara 
=  objWordDoc.Application.ActiveDocument.Paragraphs( 1 ).Range 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifWith rngPara 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif.Bold 
=  True  // 将标题设为粗体 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
.ParagraphFormat.Alignment  =   1   // 将标题居中 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
.Font.Name  =   " 隶书 "   // 设定标题字体 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
.Font.Size  =   18   // 设定标题字体大小 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
End With 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifSet rngCurrent 
=  objWordDoc.Application.ActiveDocument.Paragraphs( 3 ).Range 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifSet tabCurrent 
=  ObjWordDoc.Application.ActiveDocument.Tables.Add(rngCurrent,row,column) 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
for  i  =   1  to column 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjWordDoc.Application.ActiveDocument.Tables(
1 ).Rows( 1 ).Cells(i).Range.InsertAfter theArray(i, 1
img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjWordDoc.Application.ActiveDocument.Tables(
1 ).Rows( 1 ).Cells(i).Range.ParagraphFormat.alignment = 1  
img_a6339ee3e57d1d52bc7d02b338e15a60.gifnext 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifFor i 
= 1  to column 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifFor j 
=   2  to row 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjWordDoc.Application.ActiveDocument.Tables(
1 ).Rows(j).Cells(i).Range.InsertAfter theArray(i,j) 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifobjWordDoc.Application.ActiveDocument.Tables(
1 ).Rows(j).Cells(i).Range.ParagraphFormat.alignment = 1  
img_a6339ee3e57d1d52bc7d02b338e15a60.gifNext 
img_a6339ee3e57d1d52bc7d02b338e15a60.gifNext 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gifEnd Sub 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
/ SCRIPT>  
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif

  三、直接在IE中打开,再存为EXCEL文件

  把读出的数据用<table>格式,在网页中显示出来,同时,加上下一句即可把EXCEL表在客客户端显示。

<%response.ContentType ="application/vnd.ms-excel"%> 

  注意:显示的页面中,只把<table>输出,最好不要输出其他表格以外的信息。

  四、导出以半角逗号隔开的csv

  用fso方法生成文本文件的方法,生成一个扩展名为csv文件。此文件,一行即为数据表的一行。生成数据表字段用半角逗号隔开。(有关fso生成文本文件的方法,在此就不做介绍了)

  CSV文件介绍 (逗号分隔文件)

  选择该项系统将创建一个可供下载的CSV 文件; CSV是最通用的一种文件格式,它可以非常容易地被导入各种PC表格及数据库中。

  请注意即使选择表格作为输出格式,仍然可以将结果下载CSV文件。在表格输出屏幕的底部,显示有 "CSV 文件"选项,点击它即可下载该文件。

  如果您把浏览器配置为将您的电子表格软件与文本(TXT)/逗号分隔文件(CSV) 相关联,当您下载该文件时,该文件将自动打开。下载下来后,如果本地已安装EXCEL,点击此文件,即可自动用EXCEL软件打开此文件。

目录
相关文章
|
18天前
|
SQL 缓存 easyexcel
面试官问10W 行级别数据的 Excel 导入如何10秒处理
面试官问10W 行级别数据的 Excel 导入如何10秒处理
47 0
|
29天前
|
安全 Java 数据库连接
jdbc解析excel文件,批量插入数据至库中
jdbc解析excel文件,批量插入数据至库中
20 0
|
1月前
|
Java API Apache
使用AOP+反射实现Excel数据的读取
使用AOP+反射实现Excel数据的读取
|
1月前
|
存储 数据处理 索引
Python操作Excel常用方法汇总
Python操作Excel常用方法汇总
33 0
|
1月前
|
NoSQL 关系型数据库 MySQL
多人同时导出 Excel 干崩服务器?怎样实现一个简单排队导出功能!
业务诉求:考虑到数据库数据日渐增多,导出会有全量数据的导出,多人同时导出可以会对服务性能造成影响,导出涉及到mysql查询的io操作,还涉及文件输入、输出流的io操作,所以对服务器的性能会影响的比较大;结合以上原因,对导出操作进行排队; 刚开始拿到这个需求,第一时间想到就是需要维护一个FIFO先进先出的队列,给定队列一个固定size,在队列里面的人进行排队进行数据导出,导出完成后立马出队列,下一个排队的人进行操作;还考虑到异步,可能还需要建个文件导出表,主要记录文件的导出情况,文件的存放地址,用户根据文件列表情况下载导出文件。
多人同时导出 Excel 干崩服务器?怎样实现一个简单排队导出功能!
|
1月前
|
SQL 数据可视化 数据处理
使用SQL和Python处理Excel文件数据
使用SQL和Python处理Excel文件数据
54 0
|
29天前
|
安全 Java 数据库连接
jdbc实现批量给多个表中更新数据(解析Excel表数据插入到数据库中)
jdbc实现批量给多个表中更新数据(解析Excel表数据插入到数据库中)
153 0
|
1月前
|
存储 数据处理 Python
使用Python批量合并Excel文件的所有Sheet数据
使用Python批量合并Excel文件的所有Sheet数据
28 0
|
1月前
|
存储 数据处理 Python
使用openpyxl库从Excel文件中提取指定的数据并生成新的文件
使用openpyxl库从Excel文件中提取指定的数据并生成新的文件
28 0
|
1月前
|
数据处理 Python
4种方法用Python批量实现多Excel多Sheet合并
4种方法用Python批量实现多Excel多Sheet合并
25 0