如何在csv文件中读取exel文件并只写一列数据? [英] How to read exel file and write only one column data in csv file?

查看:298
本文介绍了如何在csv文件中读取exel文件并只写一列数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有exel文件,其中包含如下所示的数据,我想要读取所有数据并在csv文件中只导出一个列数据。我可以使用数据库但不使用数据库如何做到这一点?任何想法!



这里是数据



SR,产品,包装制造,批次,有效期, MRP,Tot.Qty,MRP,价值(Rs)



1,3 P,4 x Tab(Strip),KIR,T ,, 1.00,24,6.00



2,3 P,4 x Tab(Strip),KIR,KT14025,03 / 17,10.00,8,20.00

解决方案

这似乎是一种非常酷的方式来读取Excel文件并在CSV文件中写入所需的输出。看看 C#:使用LinqToExcel查询Excel和.CSV文件 [ ^ ]

I have exel file which has data like shown following and i want read all data and export only one column data in csv file. I can do this with use of database but how to do this without use of database ? Any ideas!

here is data

SR,Product,Packing Mfg.,Batch,Expiry,MRP,Tot.Qty,MRP,Value (Rs)

1,3 P,4 x Tab (Strip),KIR,T,,1.00,24,6.00

2,3 P,4 x Tab (Strip),KIR,KT14025,03/17,10.00,8,20.00

解决方案

This seems like a very cool way to read excel file and write desired output in CSV file. Check this out C#: Query Excel and .CSV Files Using LinqToExcel[^]


这篇关于如何在csv文件中读取exel文件并只写一列数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆