将字符串从文本框解析为Excel电子表格 [英] Parse String from textbox to an excel spreadsheet

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

问题描述

你好,



我是VB.NET的新手。我有一些过去的经验,但它是用VB 6.0,它本质上不是非常广泛。我正在努力学习,我似乎已经找到了一个表面上容易编码的编码问题,但让我感到茫然。



目标:我的公司收到关于ACH交易的电子邮件。需要将信息输入Excel电子表格,但电子邮件中有垃圾信息以及重复信息。以下是电子邮件的示例:下划线是列值斜体是列标题。



*有些标题需要创建,因为它们不在文本中。



电子邮件:

我们传送到我们的银行 $ 09,617.02 将一笔 $ 22,663.02 存入您的银行,账号为:40113 ****



付款#: 788534



已支付以下发票:



发票 Inv日期 发票金额 折扣金额 付款金额



13100875754 08/15/2013 $ 12.30 $。00 $ 12.30



描述 448143



13100877235 08/16/2013 $ 27.68 $ .00 $ 27.68



描述: 485186 ---结束电子邮件



目前我有创建了一个窗口表单,用户可以从电子邮件中复制文本并将其放入文本框中。然后,他们会点击一个名为发送到Excel的按钮,该按钮将获取文本并解析出有用的信息并将其放入新的Excel电子表格中。



这是可能?这比我想的更复杂吗?

我现在该怎么办?



感谢任何可以帮助我的人。

Hello,

I am fairly new to VB.NET. I have had some past experience but it was with VB 6.0 and it was not very expansive in nature. I am trying to learn as I go and seem to have found a coding issue that seems easy on the surface but has me at a loss.

Objective: My company receives an email regarding ACH transactions. The info needs to be entered into an Excel spreadsheet, but there is garbage info inside the email as well as repetition. Here is a sample of the email: Underlined are column values, Italics are column Headers.

*Some headers will need to be created as they are not in the text.

Email:
We transmitted to our bank on 09/17/2013 a deposit of $22,663.02 to be transferred to your bank, account number: 40113****

Payment#: 788534

The following invoices have been paid:

Invoice# Inv Date Invoice Amount Discount Amt Payment Amt

13100875754 08/15/2013 $12.30 $.00 $12.30

Description: 448143

13100877235 08/16/2013 $27.68 $.00 $27.68

Description: 485186---end email

Currently I have created a window form that a user can copy the text from the email and place it into a text box. They would then click a button called "Send to Excel" that will take the text and parse out the useful information and place it in a new Excel spreadsheet.

Is this possible? Is this more complicated than I think?
What do I do now?

Thanks to anyone that can help tutor me on this.

推荐答案

22,663.02 将转入您的银行,帐号:40113 ****



付款#: 788534



已支付以下发票:



发票 Inv日期 发票金额 折扣金额 付款金额



13100875754 08/15/2013
22,663.02 to be transferred to your bank, account number: 40113****

Payment#: 788534

The following invoices have been paid:

Invoice# Inv Date Invoice Amount Discount Amt Payment Amt

13100875754 08/15/2013


12.30
12.30


.00
.00


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

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