Aspose.cells导入excle

   Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            Workbook workbook = new Workbook("D://计量器具配备率表.xlsx");
            Cells cells = workbook.Worksheets[0].Cells;
            DataTable dt = cells.ExportDataTableAsString(0, 0, cells.MaxDataRow + 1, cells.MaxDataColumn + 1, true);

你可能感兴趣的:(代码)