我需要帮助从excel导入信息 [英] I need help importing information from excel
问题描述
我正在寻求帮助。我正在创建一个从excel工作簿导入特定信息的应用程序。我遇到的问题是某些信息的形式是"part_number.serial_number"。我需要
导入的信息只是序列号。我试过了正确的功能;但是,序列号的长度各不相同,所以我需要找出如何将所有内容导入"。"的右侧。进入应用程序。任何你能提供的帮助都将大大降价。
Hi Clay_H,
您可以拆分"part_number.serial_number"。使用"。"输入两个字符串,然后第二个字符串就是你想要的。
以下是vba中的示例。
Dim str As String
Dim arr As Variant
str =" ; part_number.serial_number"
arr = Split(str,"。")
MsgBox arr(1)
最好的问候,
Celeste
I am looking for help. I am creating an application that will import specific information from an excel workbook. The issue that I have is that some of the information is in the form of "part_number.serial_number" and the information that I need to import is only the serial number. I have tried the Right function; however, the serial number is varying lengths so I need to find out how you can import everything to the right of the "." into the application. Any help you can give would be greatly appreciated.
Hi Clay_H,
You could split the "part_number.serial_number" into two string with ".",and then the second string is what you want.
Here is the example in vba.
Dim str As String Dim arr As Variant str = "part_number.serial_number" arr = Split(str, ".") MsgBox arr(1)
Best Regards,
Celeste
这篇关于我需要帮助从excel导入信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!