当前位置:网站首页>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
边栏推荐
- Course learning accumulation ppt
- Ros2 - configuration development environment (V)
- The problem of configuring opencv in qt5.13.2 is solved in detail
- Negative number storage and type conversion in programs
- IPage can display data normally, but total is always equal to 0
- Chapter 2: try to implement a simple bean container
- Jenkins reported an error. Illegal character: '\ufeff'. Class, interface or enum are required
- IPage能正常显示数据,但是total一直等于0
- ROS2——功能包(六)
- SOC_ SD_ CMD_ FSM
猜你喜欢

Ros2 - first acquaintance with ros2 (I)

U-boot initialization and workflow analysis

ROS2——topic话题(八)

Steps and FAQs of connecting windows Navicat to Alibaba cloud server MySQL

ROS2——ROS2对比ROS1(二)

What if the DataGrid cannot see the table after connecting to the database

第 2 章:小试牛刀,实现一个简单的Bean容器

SOC_SD_DATA_FSM

Ros2 topic (VIII)

【idea】Could not autowire. No beans of xxx type found
随机推荐
二分查找(折半查找)
Import CV2, prompt importerror: libcblas so. 3: cannot open shared object file: No such file or directory
[node] differences among NPM, yarn and pnpm
The problem of configuring opencv in qt5.13.2 is solved in detail
Three body goal management notes
testing framework
MySQL setting trigger problem
[software testing] 04 -- software testing and software development
全局变量和静态变量的初始化
逻辑结构与物理结构
ROS2——topic话题(八)
window navicat连接阿里云服务器mysql步骤及常见问题
小米笔试真题一
Initialization of global and static variables
SD_CMD_RECEIVE_SHIFT_REGISTER
*P++, (*p) + +, * (p++) differences
What is soda?
DelayQueue延迟队列的使用和场景
npm install -g/--save/--save-dev的区别
【软件测试】06 -- 软件测试的基本流程