[]
        
(Showing Draft Content)

DataImportResult

Class DataImportResult

java.lang.Object
com.grapecity.documents.excel.DataImportResult

public final class DataImportResult extends Object
Contains information about an imported range.

A DataImportResult is returned by IRange.importData(java.lang.Object) and IRange.importData(java.lang.Object,DataImportOptions). It describes the size of the imported data at the target location, including how many rows and columns were imported.


 Object[][] values = {{"Name", "Score"}, {"Alice", 100}};
 DataImportResult result = worksheet.getRange("A1").importData(values);
 int rowsImported = result.getRowsImported();
 int columnsImported = result.getColumnsImported();
 
  • Constructor Details

    • DataImportResult

      public DataImportResult()
  • Method Details

    • getRowsImported

      public int getRowsImported()
      Gets the number of rows imported to the specified location.

      The returned value reflects the height of the imported data written by IRange.importData(java.lang.Object) or IRange.importData(java.lang.Object,DataImportOptions).

      
       Object[][] values = {{"Name", "Score"}, {"Alice", 100}};
       DataImportResult result = worksheet.getRange("A1").importData(values);
       int rowsImported = result.getRowsImported();
       
      Returns:
      The number of rows imported to the target range.
    • getColumnsImported

      public int getColumnsImported()
      Gets the number of columns imported to the specified location.

      The returned value reflects the width of the imported data written by IRange.importData(java.lang.Object) or IRange.importData(java.lang.Object,DataImportOptions).

      
       Object[][] values = {{"Name", "Score"}, {"Alice", 100}};
       DataImportResult result = worksheet.getRange("A1").importData(values);
       int columnsImported = result.getColumnsImported();
       
      Returns:
      The number of columns imported to the target range.