当前位置:网站首页>Batch convert txt to excel format
Batch convert txt to excel format
2022-07-05 07:15:00 【RS&Hydrology】
What you want to achieve : The batch will txt Convert to corresponding Excel Format ( One txt The file corresponds to a Excel file ).
1. Use existing tools ( It is suitable for the situation of small amount of data )
It can be converted online directly :https://anyconv.com/txt-to-xlsx-converter/
Pro testing can be used , But download one by one .
2. utilize VBA
Sub txt2excel()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Dim txt, fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.AllowMultiSelect = True
If .Show = -1 Then
For Each txt In .SelectedItems
Workbooks.OpenText Filename:=txt, Origin:=936, DataType:=xlDelimited, Semicolon:=False, Comma:=True, Space:=False, Other:=False, Tab:=True
Range("a:u").NumberFormatLocal = "@"
ActiveWorkbook.SaveAs Filename:=Mid(txt, 1, Len(txt) - 4) & ".xls", FileFormat:=xlExcel8
'ActiveWorkbook.SaveAs Filename:=Mid(txt, 1, Len(txt) - 4), FileFormat:=xlExcel8
ActiveWorkbook.Close True
Next
Else
Exit Sub
End If
End With
End Sub
边栏推荐
- Ret2xx---- common CTF template proposition in PWN
- [software testing] 05 -- principles of software testing
- Concurrent programming - how to interrupt / stop a running thread?
- Powermanagerservice (I) - initialization
- D2L installation
- Unity 之 ExecuteAlways正在取代ExecuteInEditMode
- Ros2 - node (VII)
- Mipi interface, DVP interface and CSI interface of camera
- Oracle code use
- 一文揭开,测试外包公司的真实情况
猜你喜欢

Docker installs MySQL and uses Navicat to connect

ROS2——node节点(七)

M2dgr slam data set of multi-source and multi scene ground robot

ROS2——初识ROS2(一)

Ros2 - ros2 vs. ros1 (II)

Ros2 - node (VII)

C#学习笔记
![[idea] efficient plug-in save actions to improve your work efficiency](/img/6e/49037333964865d9900ddf5698f7e6.jpg)
[idea] efficient plug-in save actions to improve your work efficiency

Ros2 - workspace (V)

Mathematical analysis_ Notes_ Chapter 8: multiple integral
随机推荐
Tshydro tool
程序中的负数存储及类型转换
1290_FreeRTOS中prvTaskIsTaskSuspended()接口实现分析
What if the DataGrid cannot see the table after connecting to the database
基于Cortex-M3、M4的GPIO口位带操作宏定义(可总线输入输出,可用于STM32、ADuCM4050等)
Initialization of global and static variables
Database SQL practice 3. Find the current salary details of the current leaders of each department and their corresponding department number Dept_ no
Ros2 - node (VII)
Unity ugui how to match and transform coordinates between different UI panels or uis
【软件测试】05 -- 软件测试的原则
能量守恒和打造能量缺口
Course learning accumulation ppt
1290_ Implementation analysis of prvtaskistasksuspended() interface in FreeRTOS
Concurrent programming - deadlock troubleshooting and handling
第 2 章:小试牛刀,实现一个简单的Bean容器
About vscode, "code unreachable" will be displayed when calling sendline series functions with pwntools“
Reading literature sorting 20220104
Ros2 - Service Service (IX)
【obs】x264编码:“buffer_size“
Literacy Ethernet MII interface types Daquan MII, RMII, smii, gmii, rgmii, sgmii, XGMII, XAUI, rxaui