.NET开发人员的xls文件有多相关?

时间:2021-07-29 20:21:50

Once in a while, we use .XLS file to convert the data stored in the XML file and populate some dropdownlist and other server controls using XmlDataSource object. I am just wondering how popular is the use of the.XLS file in the .Net proejcts? We have used to populate countries list and state list and other huge amount of the project specific lists.

偶尔,我们使用.XLS文件转换存储在XML文件中的数据,并使用XmlDataSource对象填充一些下拉列表和其他服务器控件。我只是想知道在.Net项目中使用.XLS文件有多受欢迎?我们习惯于填写国家/地区列表和州名单以及其他大量项目特定列表。

3 个解决方案

#1


Well, Excel (XLS) is very popular with a lot of management and project planning folks - hardcore developer will probably prefer the straight XML.

好吧,Excel(XLS)很受管理和项目规划人员的欢迎 - 硬核开发人员可能更喜欢直接的XML。

XLS is ok - but it's a bit messy to deal with and to create and read (before the Excel 2007 XLSX xml-based format).

XLS没问题 - 但处理和创建和读取(在Excel 2007 XLSX基于xml的格式之前)有点混乱。

So - if you're exchanging data and/or keeping track of data to display in a drop down list - use a proper database table, or if that's not possible, I'd recommend XML over Excel (XSL).

因此 - 如果您正在交换数据和/或跟踪数据以显示在下拉列表中 - 使用正确的数据库表,或者如果不可能,我建议使用XML over Excel(XSL)。

#2


using gui based COM interop with applications server-side is a collosal no-no. Either cache/persist the data from xml in memory, or put it into a database.

使用基于gui的COM互操作与应用程序服务器端是一个collosal禁止。从内存中缓存/保存xml中的数据,或将其放入数据库中。

I am focusing on your mention of server-control. if you are using .Net 3.5, use a Linq-to-XML query against the xml source, and put the result into asp.net cache, with a cache dependency on the original xml, this is your best bet. If it's key/value pairs for a listbox, this is what Dictionary was made for.

我专注于你提到的服务器控制。如果您使用的是.Net 3.5,请对xml源使用Linq-to-XML查询,并将结果放入asp.net缓存中,并且对原始xml具有缓存依赖性,这是您最好的选择。如果它是列表框的键/值对,那么这就是Dictionary的用途。

Excel can be a nice shortcut for a lot of automation tasks, but a server-side and presumably web context is a particularly bad fit. Especially for storing processed XML.

对于许多自动化任务来说,Excel可以是一个很好的快捷方式,但服务器端和可能的Web上下文是一个特别糟糕的选择。尤其适用于存储已处理的XML

#3


I have found XLST (I'm assuming that's what you're talking about) to come in quite handy in my own personal experience for .NET development tied in with XML and HTML. It has some definite quirks that I don't particularly care for, but all in all, I've found it to be worthy enough to warrant its use.

我发现XLST(我假设你正在谈论的内容)非常方便我自己的.NET开发个人经验与XML和HTML相关联。它有一些我并不特别关心的明确怪癖,但总而言之,我发现它值得保证它的使用。

#1


Well, Excel (XLS) is very popular with a lot of management and project planning folks - hardcore developer will probably prefer the straight XML.

好吧,Excel(XLS)很受管理和项目规划人员的欢迎 - 硬核开发人员可能更喜欢直接的XML。

XLS is ok - but it's a bit messy to deal with and to create and read (before the Excel 2007 XLSX xml-based format).

XLS没问题 - 但处理和创建和读取(在Excel 2007 XLSX基于xml的格式之前)有点混乱。

So - if you're exchanging data and/or keeping track of data to display in a drop down list - use a proper database table, or if that's not possible, I'd recommend XML over Excel (XSL).

因此 - 如果您正在交换数据和/或跟踪数据以显示在下拉列表中 - 使用正确的数据库表,或者如果不可能,我建议使用XML over Excel(XSL)。

#2


using gui based COM interop with applications server-side is a collosal no-no. Either cache/persist the data from xml in memory, or put it into a database.

使用基于gui的COM互操作与应用程序服务器端是一个collosal禁止。从内存中缓存/保存xml中的数据,或将其放入数据库中。

I am focusing on your mention of server-control. if you are using .Net 3.5, use a Linq-to-XML query against the xml source, and put the result into asp.net cache, with a cache dependency on the original xml, this is your best bet. If it's key/value pairs for a listbox, this is what Dictionary was made for.

我专注于你提到的服务器控制。如果您使用的是.Net 3.5,请对xml源使用Linq-to-XML查询,并将结果放入asp.net缓存中,并且对原始xml具有缓存依赖性,这是您最好的选择。如果它是列表框的键/值对,那么这就是Dictionary的用途。

Excel can be a nice shortcut for a lot of automation tasks, but a server-side and presumably web context is a particularly bad fit. Especially for storing processed XML.

对于许多自动化任务来说,Excel可以是一个很好的快捷方式,但服务器端和可能的Web上下文是一个特别糟糕的选择。尤其适用于存储已处理的XML

#3


I have found XLST (I'm assuming that's what you're talking about) to come in quite handy in my own personal experience for .NET development tied in with XML and HTML. It has some definite quirks that I don't particularly care for, but all in all, I've found it to be worthy enough to warrant its use.

我发现XLST(我假设你正在谈论的内容)非常方便我自己的.NET开发个人经验与XML和HTML相关联。它有一些我并不特别关心的明确怪癖,但总而言之,我发现它值得保证它的使用。