读取具有433列的Excel文件 [英] Reading excel file having 433 columns

查看:65
本文介绍了读取具有433列的Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在构建一个应用程序,希望将.xlsx文件转换为.csv文件.一个excel文件包含433​​列,但仅将其转换为255列.请向我提供可以读取超过255列的解决方案. "h2_lin">解决方案

尝试在选择查询中使用范围来读取Excel文件.

如果此方法不起作用,请提供正确的解决方案




请告诉我们将您转换为excel文件为cvs文件的过程.
如果您要通过代码进行转换,则可以在Excel文件中放入读取数据的循环,并在cvs文件中插入数据,并花费几毫秒的时间差来继续循环.

如有问题,请告诉我您的代码!




使用此修改后的代码可以正常工作.

 字符串 connectionString = 字符串 .Format(  Provider = Microsoft.ACE.OLEDB.12.0;数据源= {0};扩展属性=" Excel 12.0; HDR =否; IMEX = 1"",fpath);
        OleDbConnection conn = ;
        StreamWriter wrtr = ;
        OleDbCommand cmd = ;
        OleDbDataAdapter da = ;
       
            conn =  OleDbConnection(connectionString);
            conn.Open();
            cmd =  OleDbCommand("  解决方案 

try using range in the select query for reading the excel file.

Please do provide the right solution, if this doesn''t work


Hi,

Please tell us what is the process to follow you convert to excel file to cvs file.
if are you convert though code then you can put for loop for read data on excel file and insert data on cvs file and make some millisecond time difference to continue the loop.

if any problem show me your code!!


Hi,

use this modified code working fine.

string connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0; Data Source={0}; Extended Properties=""Excel 12.0;HDR=No;IMEX=1""", fpath);
        OleDbConnection conn = null;
        StreamWriter wrtr = null;
        OleDbCommand cmd = null;
        OleDbDataAdapter da = null;
       
            conn = new OleDbConnection(connectionString);
            conn.Open();
            cmd = new OleDbCommand("SELECT * FROM [test


这篇关于读取具有433列的Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
其他开发语言最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆