解析Excel电子表格 [英] Parsing Excel Spreadsheet

查看:108
本文介绍了解析Excel电子表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,感谢您的帮助。我正在处理一个需要解析一个

Excel电子表格的应用程序的
,该电子表格将加载到SQL Server

表中。电子表格的示例位于:

http://ratesheets.sollen.com/script/...ts/interfirst/

费率表/ IFRS1_20030722_094227.xls


问题的核心是电子表格的有时不同的布局。例如,应用程序

要求单元格H13和D23之间的日期是

加载到表中。但是,相同的数据可能是明天在H12和D22之间的b $ b。因此应用程序

需要能够确定

数据的起点。幸运的是,标题不会改变,所以

中的一个明显的处理方法是移动每个

单元格(即A1,A2,B1,B2)直到已知标头值

。然而,这似乎是一种非常有效的方法来处理这个问题。是否还有另一种方法来确定开始处理的起点,即

英语找到等于30年的单元格固定 -

程序100。任何ehlp都将不胜感激。

谢谢。

解决方案

Excel具有查找功能。您可以使用它将活动单元格设置为包含所需文本的

单元格。


Colin


Hugh McLaughlin <胡** @ kmcnetwork.com>在留言中写道

news:05 **************************** @ phx.gbl ... < blockquote class =post_quotes>处理此问题的低效方法。是否有另一种方法来确定开始处理的起点,即在
英语中查找等于30年固定的单元格 - 程序100。任何ehlp都将不胜感激。
谢谢。



你好休,


我不喜欢我认为有任何容易实现这一点。如果您确切知道自动化Excel时数据的确切位置,您可以将其作为参数输入

您的函数来获取数据。如果您不知道,您必须自己搜索

数据。或者您是否可以在

Excel文件中创建一个特殊窗格以包含有效数据的起始区域?


问候,


HuangTM

微软在线合作伙伴支持

MCSE / MCSD


安全! - www.microsoft.com/security

提供发布?°原样?没有保证,也没有授予任何权利。


感谢您的回复。由thrid派对生成的Excel文件是
,所以我不清楚我如何能够自动化窗格。科林的发现理念

是否有意义。如何从Asp.Net页面访问它?

-----原始消息-----
Hello Hugh,
我认为没有任何容易实现的目标。如果
确切知道自动化Excel时数据的位置,您可以输入
作为函数中的参数来获取数据。如果你不知道,你b $ b必须自己搜索数据。或者您是否可以在Excel文件中创建
特殊窗格以包含有效数据的起始区域?

问候,

HuangTM
Microsoft在线合作伙伴支持
MCSE / MCSD

获得安全保障! - www.microsoft.com/security
提供此帖子? °没有保证
并且不授予任何权利。



Hello Everyone and thanks for your help in advance. I am
working on an application that requires the parsing of an
Excel spreadsheet that will be loaded into a SQL Server
table. An example of the spreadsheet is located at:

http://ratesheets.sollen.com/script/...ts/interfirst/
ratesheets/IFRS1_20030722_094227.xls

At the heart of the problem is the sometimes varying
layout of the spreadsheet. For example, the application
requires that the date between cells H13 and D23 be
loaded into the table. However, the same data may be
located between H12 and D22 tomorrow. So the application
needs to be able to determine the starting point of the
data. Fortunately, the headings do not change, so one of
the obvious ways to handle this is to move through each
cell (i.e. A1, A2, B1, B2) until the known header value
is achieved. However, this seems to be a very
inefficient way to handle this. Is there another way to
identify the starting point to begin processing, i.e. in
English "Find the cell that equals 30 YEAR FIXED -
Program 100". Any ehlp would be greatly appreciated.
Thanks.

解决方案

Excel has a find function. You can use that to set the active cell to the
cell containing the desired text.

Colin

"Hugh McLaughlin" <hu**@kmcnetwork.com> wrote in message
news:05****************************@phx.gbl...

inefficient way to handle this. Is there another way to
identify the starting point to begin processing, i.e. in
English "Find the cell that equals 30 YEAR FIXED -
Program 100". Any ehlp would be greatly appreciated.
Thanks.



Hello Hugh,

I don''t think there is any easy to achieve this. If you know exactly where
the data is when you automate Excel, you could input it as a parameter in
your function to get the data. If you don''t know, you have to search the
data by yourself. Or is it possible for you to create a special pane in
Excel file to contain the beginning area of valid data?

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ?°as is?± with no warranties and confers no rights.


Thanks for your response Tian. The Excel file is
generated by a thrid party, so I am unclear as to how I
could automate a pane. Does Colin''s Find fucntion idea
make sense. How do you access it from an Asp.Net page?

-----Original Message-----
Hello Hugh,

I don''t think there is any easy to achieve this. If you know exactly where the data is when you automate Excel, you could input it as a parameter in your function to get the data. If you don''t know, you have to search the data by yourself. Or is it possible for you to create a special pane in Excel file to contain the beginning area of valid data?

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ?°as is?± with no warranties and confers no rights.

.



这篇关于解析Excel电子表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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