将电子邮件正文数据导出到excel wookbook [英] Exporting email body data to excel wookbook
问题描述
我正在开发一个需要从电子邮件正文中提取数据的项目。所有电子邮件都保存在特定文件夹中[允许调用文件夹名称"S:\Research\xxExamplexx"]。提取将是一次性事件,但我希望
可以选择在将来再次重新提取提取。为了简单起见,我希望将数据导出到名为"ICU data"的新Excel文档。
我尝试过使用VBA,但我是新手,并且无法获取我在网上找到工作的宏,可能是因为我不理解语法。
提前感谢您的帮助。
电子邮件的格式如下:
MRN :: AAAAAAAA
ICU床位:BB
日期 评估:CCCCCC
ICU出席:DDDDDD
ICU出席(其他):EEEEEEE
PERSON名称填写此表格:: FFFFFFF
外科护理触发器:GGGGGGG
外科护理触发器:: HHHHHHH
是否应根据触发器咨询SURGERY? :IIIIII
咨询日期/时间:JJJJJJJ
如果没有放入SURGICAL咨询 - 原因:: KKKKKKK
评论:: LLLLLLLLL
我希望将数据导出到Excel(或.csv),其中每列都有一个标题标签,这是之前的文本":":并且信息"AAAA","BBBB","CCCCCC"等是每个电子邮件中每行
中的值的值。
我想要Excel输出看起来像:
MRN | ICU床位 | 评估日期 | |
AAAA1 | BBBB1 | CCCC1 | DDDD1 |
AAAA2 | BBBB2 | CCCC2 | DDDD2 |
AAAA3 | BBBB3 | CCCC3 | DDDD3 |
再次感谢您的帮助。
参见
https://social.msdn.microsoft.com/Forums/en-US/28e0896b-4682-4db2-90ec-9da5c5a235ca/export-outlook-email-items-to-excel?forum=isvvba
I am working on a project that needs to extract data from the body of emails. All of the emails are saved in a specific folder [lets call folder name "S:\Research\xxExamplexx"]. The extraction would be a one time event, but I would like to have the option to re-run the extraction again in the future. For the purposes of simplicity, I'd like the data to be exported to a new Excel document called "ICU data".
I have tried using VBA, but am a total novice, and can't get the macros that I'm finding online to work, probably because I don't understand the syntax.
Thank you in advance for your help.
The format of the emails are as follows:
MRN: : AAAAAAAA
ICU Bed space: : BB
Date of Assessment : CCCCCC
ICU Attending : DDDDDD
ICU Attending (Other): EEEEEEE
Name of PERSON completing this form: : FFFFFFF
SURGICAL Care Triggers: GGGGGGG
SURGICAL Care Triggers: : HHHHHHH
Should SURGERY be consulted based on triggers? : IIIIII
Date/time consult was placed : JJJJJJJ
If SURGICAL consult was not placed--reason: : KKKKKKK
Comments: : LLLLLLLLL
I would like the data to be exported to Excel (or as .csv) where each column has a header label, which is the text prior to the ": :" and the information"AAAA", "BBBB", "CCCCCC", etc are values in those columns in one row for each email.
I would like the Excel output to look like:
MRN | ICU Bed space | Date of Assessment | ICU attending |
AAAA1 | BBBB1 | CCCC1 | DDDD1 |
AAAA2 | BBBB2 | CCCC2 | DDDD2 |
AAAA3 | BBBB3 | CCCC3 | DDDD3 |
Again, thank you for your help.
See https://social.msdn.microsoft.com/Forums/en-US/28e0896b-4682-4db2-90ec-9da5c5a235ca/export-outlook-email-items-to-excel?forum=isvvba
这篇关于将电子邮件正文数据导出到excel wookbook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!