当前位置:网站首页>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
边栏推荐
- Mipi interface, DVP interface and CSI interface of camera
- C语言数组专题训练
- ROS2——工作空间(五)
- 目标检测系列——Faster R-CNN原理详解
- Import CV2, prompt importerror: libcblas so. 3: cannot open shared object file: No such file or directory
- 苏打粉是什么?
- new和malloc的区别
- 并发编程 — 如何中断/停止一个运行中的线程?
- Now there are HTML files and MVC made with vs (connected to the database). How can they be connected?
- Literacy Ethernet MII interface types Daquan MII, RMII, smii, gmii, rgmii, sgmii, XGMII, XAUI, rxaui
猜你喜欢

你心目中的数据分析 Top 1 选 Pandas 还是选 SQL?

Chapter 2: try to implement a simple bean container

SOC_ SD_ CMD_ FSM

Mathematical analysis_ Notes_ Chapter 8: multiple integral

Skywalking all

ROS2——常用命令行(四)

SOC_SD_DATA_FSM
![[untitled]](/img/d5/2ac2b15818cf66c241e307c6723d50.jpg)
[untitled]

IPage can display data normally, but total is always equal to 0

Three body goal management notes
随机推荐
IPage能正常显示数据,但是total一直等于0
Mid 2022 documentary -- the experience of an ordinary person
Ros2 topic (VIII)
【软件测试】04 -- 软件测试与软件开发
Mipi interface, DVP interface and CSI interface of camera
Application of MATLAB in Linear Algebra (4): similar matrix and quadratic form
Tshydro tool
In C language, int a= 'R'
Target detection series - detailed explanation of the principle of fast r-cnn
Executealways of unity is replacing executeineditmode
[vscode] prohibit the pylance plug-in from automatically adding import
ROS2——配置开发环境(五)
解读最早的草图-图像翻译工作SketchyGAN
基于Cortex-M3、M4的GPIO口位带操作宏定义(可总线输入输出,可用于STM32、ADuCM4050等)
Typescript get timestamp
Database SQL practice 4. Find the last of employees in all assigned departments_ Name and first_ name
Qu'est - ce que l'hydroxyde de sodium?
Ros2 - Service Service (IX)
[software testing] 02 -- software defect management
SD_ CMD_ RECEIVE_ SHIFT_ REGISTER