根级别的数据无效。第1行位置1. c# [英] data at the root level is invalid. line 1 position 1. c#

查看:114
本文介绍了根级别的数据无效。第1行位置1. c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在阅读xlsx到xml时遇到问题



代码:

I have a problem when read xlsx to xml

code:

{
             DataSet ds = new DataSet();
            string myXMLfile = @"E:\a.xlsx";
            ds.ReadXml(myXMLfile);
}



消息错误:


message error:

[ data at the root level is invalid. line 1 position 1.]

推荐答案

您确定要读取XML文件吗?



xlsx 是Excel 2007 - 2010文件扩展名
Are you sure your reading an XML file?

the xlsx is an Excel 2007 - 2010 file extension


这篇关于根级别的数据无效。第1行位置1. c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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