.net获取Excel单元格内的信息
两种方式, 一:通过写死具体单元格的行列获取 二:通过标签获取,标签获取实际不如写死单元格方便,因为要获取的位置较多,设置很麻烦 Dim FmObj As New OpenFileDialog FmObj.Filter = "Word文件|*.doc;*.docx|Html文件|*.html" FmObj.Multiselect = False If FmObj.ShowDialog(Me) <> DialogResult.OK Then Exit Sub End If Dim FilePath As String = FmObj.FileName Dim FileExt As String = System.IO.Path.GetExtension(FilePath).ToLower Dim SysWorkPath As String = Application.StartupPath & "\..\" '系统路径 Dim SysTmpPath As String = SysWorkPath & "..\Tmp\" '临时目录路径 Try If FileExt = ".doc" OrElse FileExt = ".docx" Then Dim wordDoc As Interop.Word.Document Dim wordApp As New Microsoft.Office