1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

PAD: Excel の 変換 *.xls から *.xlsx

Posted at

背景

未だに *.xls ファイルを利用していたりするのです・・
でも、Share Point や Automate で利用しようとすると *.xlsx 形式でなければ動作しません。

ということで、PAD 用の変換方法を用意した、というお話。

概要

単純に、PAD で開いて、形式選択して保存したら OK でした。

Share 上であれば、閲覧状態で開かれた後で、編集に変更すると、「変換」が簡単に出来るのはありがたいですね。

image.png

動作例

image.png

実装

このまま PAD のタブに貼り付ければ OK

xls2xlsx
SET ExcelPath TO $'''C:\\temp\\Excel97-2003book.xls'''
File.GetPathPart File: ExcelPath RootPath=> RootPath Directory=> Directory FileName=> FileName FileNameWithoutExtension=> FileNameNoExtension Extension=> FileExtension
DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
Text.ConvertDateTimeToText.FromCustomDateTime DateTime: CurrentDateTime CustomFormat: $'''yyyyMMdd''' Result=> FormattedDateTime
Excel.LaunchExcel.LaunchAndOpen Path: ExcelPath Visible: False ReadOnly: False LoadAddInsAndMacros: False Instance=> ExcelInstance
Excel.SaveExcel.SaveAs Instance: ExcelInstance DocumentFormat: Excel.ExcelFormat.OpenXmlWorkbook DocumentPath: $'''%Directory%/%FileNameNoExtension%_%FormattedDateTime%.xlsx'''
Excel.CloseExcel.Close Instance: ExcelInstance
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?