当前位置:网站首页>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
边栏推荐
猜你喜欢
目标检测系列——Faster R-CNN原理详解
ROS2——工作空间(五)
SD_ CMD_ RECEIVE_ SHIFT_ REGISTER
PHY drive commissioning --- mdio/mdc interface Clause 22 and 45 (I)
ROS2——node节点(七)
Delayqueue usage and scenarios of delay queue
iNFTnews | 喝茶送虚拟股票?浅析奈雪的茶“发币”
Ros2 - function package (VI)
Logical structure and physical structure
U-Boot初始化及工作流程分析
随机推荐
并发编程 — 死锁排查及处理
About vscode, "code unreachable" will be displayed when calling sendline series functions with pwntools“
docker安装mysql并使用navicat连接
小米笔试真题一
SOC_ SD_ CMD_ FSM
Install deeptools in CONDA mode
The difference between NPM install -g/-save/-save-dev
PostMessage communication
Initialization of global and static variables
SD_CMD_RECEIVE_SHIFT_REGISTER
Ros2 - node (VII)
[OBS] x264 Code: "buffer_size“
Ros2 - workspace (V)
Oracle code use
Intelligent target detection 59 -- detailed explanation of pytoch focal loss and its implementation in yolov4
PHY drive commissioning - phy controller drive (II)
【obs】x264编码:“buffer_size“
Lexin interview process
ROS2——常用命令行(四)
Solve tensorfow GPU modulenotfounderror: no module named 'tensorflow_ core. estimator‘