数据转换为Excel 2007 [英] Data convert to Excel 2007
本文介绍了数据转换为Excel 2007的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨.我这里有一个程序,仅提供这两个数据.我需要在Excel 2007中显示它们.如何开始?我已经尝试过在线搜索,但是对于要执行的操作毫无用处.这是我的代码:
using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { double p = 1.016; string q = "00180000"; Console.WriteLine("Voltage: {0}", p); Console.WriteLine("EmployeeID: {0}", q); } } }
希望有人可以帮助我.在此先感谢
解决方案
您需要使用Excel互操作库来创建excel数据,或者仅将其另存为CSV,Excel将打开它.
CSV只是一个逗号分隔的文件,例如
16,20
1.5,6,2
Excel可以打开它.
请编辑您的帖子,不要发布假答案.
我不确定你的意思.您创建一个文件,记录之间用逗号分隔,行之间用换行符分隔.那是CSV.
Hi. I have a programme here with just these 2 data available. I need to display them in Excel 2007. How do I start? I have tried searching online but to no avail as to exactly what is to be done. Here''s my code:
using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { double p = 1.016; string q = "00180000"; Console.WriteLine("Voltage: {0}", p); Console.WriteLine("EmployeeID: {0}", q); } } }
Hopefully someone can help me on this. Thanks in advance解决方案You need to use the Excel interop libraries to create excel data, OR just save as a CSV, which Excel will open.
A CSV is just a comma seperate file, like
16, 20
1.5, 6, 2
Excel can open that. You''ll have more control with iterop tho.
Please edit your post, don''t post fake answers.
I am not sure what you mean. You create a file with commas between records and newlines between rows. That''s a CSV.
这篇关于数据转换为Excel 2007的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文