当前位置:网站首页>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
边栏推荐
- Ros2 - common command line (IV)
- 目标检测系列——Faster R-CNN原理详解
- 【软件测试】06 -- 软件测试的基本流程
- [software testing] 05 -- principles of software testing
- Unity 之 ExecuteAlways正在取代ExecuteInEditMode
- arcpy. SpatialJoin_ Analysis spatial connection analysis
- IPage能正常显示数据,但是total一直等于0
- Ros2 - workspace (V)
- Matlab在线性代数中的应用(四):相似矩阵及二次型
- [vscode] prohibit the pylance plug-in from automatically adding import
猜你喜欢

Pytorch has been installed in anaconda, and pycharm normally runs code, but vs code displays no module named 'torch‘

ROS2——配置开发环境(五)
![[vscode] prohibit the pylance plug-in from automatically adding import](/img/a7/d96c0c4739ff68356c15bafbbb1328.jpg)
[vscode] prohibit the pylance plug-in from automatically adding import

window navicat连接阿里云服务器mysql步骤及常见问题

Netease to B, soft outside, hard in

The problem of configuring opencv in qt5.13.2 is solved in detail

SD_CMD_RECEIVE_SHIFT_REGISTER

U-Boot初始化及工作流程分析

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

Powermanagerservice (I) - initialization
随机推荐
Ros2 - ros2 vs. ros1 (II)
The SQL implementation has multiple records with the same ID, and the latest one is taken
PostMessage communication
PHY drive commissioning --- mdio/mdc interface Clause 22 and 45 (I)
Application of MATLAB in Linear Algebra (4): similar matrix and quadratic form
2022.06.27_ One question per day
乐鑫面试流程
new和malloc的区别
The problem of configuring opencv in qt5.13.2 is solved in detail
C learning notes
1290_ Implementation analysis of prvtaskistasksuspended() interface in FreeRTOS
ModuleNotFoundError: No module named ‘picamera‘
解读最早的草图-图像翻译工作SketchyGAN
【软件测试】05 -- 软件测试的原则
[OBS] x264 Code: "buffer_size“
Target detection series - detailed explanation of the principle of fast r-cnn
基于FPGA的一维卷积神经网络CNN的实现(八)激活层实现
网易To B,柔外刚中
arcpy. SpatialJoin_ Analysis spatial connection analysis
Solve tensorfow GPU modulenotfounderror: no module named 'tensorflow_ core. estimator‘