Skip to content

configuration is not used when writing using IDataReader #735

@rferraton

Description

@rferraton

Excel Type

  • XLSX
  • XLSM
  • CSV
  • OTHER

Upload Excel File

mssql_orders.xlsx

MiniExcel Version

1.38.0

Description

the configuration used when writing is not used :

 DbCommand sqr;
 sqr = DBCommonUtils.GetCommand(connectionType, inputsql, sqlConnection);

 var config = new OpenXmlConfiguration();
 config.BufferSize = 1024 * 1024 * 4;
 config.FastMode = true;
var nfib = new NumberFormatInfo();
nfib.NumberDecimalSeparator = ".";
var culture = (CultureInfo)CultureInfo.InvariantCulture.Clone();
culture.NumberFormat = nfib;                    
config.Culture = culture;
config.EnableAutoWidth = true;

using (var sdr = sqr.ExecuteReader())
{
    MiniExcel.Insert(FullFileName, sdr, sheetName: p.sourcetable, overwriteSheet: true, configuration:config);
    ccols = sdr.FieldCount;
    crows = 0; // waiting for rowcount attribute feature on Insert						
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions