GridWebのためのLoadOptions

他のエンコードでロードする

csvファイルの場合、実際にはxlsx形式ファイルに記載されている特定のエンコードがありません。

したがって、ユーザーはファイルをロードする前に特定の文字エンコーディングを設定できます。

中国語でロードするサンプルコードが以下に示されています:

    GridTxtLoadOptions topt = new GridTxtLoadOptions();
    topt.Encoding = (Encoding.GetEncoding("GB2312"));
    GridWeb1.LoadOptions = topt;
    String filePath = Server.MapPath("~/workbook/chinesefile.csv");
    GridWeb1.ImportExcelFile(filePath);