Home > Net >  C # how to read who Excel approved content source;
C # how to read who Excel approved content source;

Time:11-03

Can direct messages; ChongXie! It is better for the entire source code; They don't need the stick is part of the online

CodePudding user response:

What you said is the content of c # read excel, I have read c # excel content source

CodePudding user response:

Workbook Workbook=new Workbook (filename);
Cells Cells=workbook. Worksheets) [r]. "Sheet1" Cells.
System. Data. DataTable dt=cells. ExportDataTableAsString (0, 0, cells. MaxDataRow + 1, cells. MaxColumn + 1, true);

CodePudding user response:

Approval of content - what the hell is?

CodePudding user response:

Read the database, and then literally sought

CodePudding user response:

What you said is notation

CodePudding user response:

Notation?
Microsoft. Office. Interop. Excel. Application myobject.=new Microsoft Office. Interop. Excel. The Application ();
Microsoft. Office. Interop. Excel. _Workbook m_objBook=myobject. Workbooks. Open (@ "H: \ \ aa. XLSX m_objOpt, m_objOpt, m_objOpt, m_objOpt, m_objOpt, m_objOpt, m_objOpt, m_objOpt, m_objOpt, m_objOpt, m_objOpt, m_objOpt);
M_objsheets=m_objBook. Worksheets;
M_objSheet=(_Worksheet) m_objsheets. Get_Item (" Sheet1 ");
String pos="A1";
M_objRange=m_objSheet. Get_Range (pos, m_objOpt);
String s=m_objRange.Com ment. Shape. AlternativeText;
M_objBook. Close (m_objOpt m_objOpt, m_objOpt);
Myobject. Workbooks. The Close ();
Myobject. Quit ();
System. The Runtime. InteropServices. Marshal. ReleaseComObject (m_objBook);
System. The Runtime. InteropServices. Marshal. ReleaseComObject (myobject);
M_objBook=null;
Myobject=null;
GC. Collect ();
  •  Tags:  
  • C#
  • Related