- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
在linux中,把csv文件转换成excel表格(xlsx或者xls) B- V5 C+ |6 o5 ], s% J; ?2 J: e
$ d" S6 a$ d, |5 z! F+ {# B3 b echo -e 'surname,name,age\nCarlo,Smith,23\nJohn,Doe,46\nJane,Doe,69\nSarah,Meyer,23\n' > example.csv; |$ m! |, s7 s1 x, T7 u9 Z
, [+ T r) A: g2 C) ~* O4 ^4 d
yum provides unix2dos
7 X. S6 n/ v$ U9 {% `Loaded plugins: fastestmirror, langpacks% t" ?' @8 E( Q+ l2 H
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
- S! ^. S% ]1 ~Loading mirror speeds from cached hostfile( m; k$ i j/ v; h8 c$ A
dos2unix-6.0.3-7.el7.x86_64 : Text file format converters( e1 Q4 `% A) L/ n4 G1 J
Repo : local- ]7 u7 j; i5 |7 X K, F( `* C4 X7 \
Matched from:
2 q% |1 {$ A/ \5 v1 o- `4 xProvides : unix2dos = 6.0.3-7.el7
, Z. U( d6 m% N, y5 `
2 n8 ]/ k, F0 e1 B# pyum install -y unix2dos. A# b3 Z7 r, U+ O) m" M
Loaded plugins: fastestmirror, langpacks
0 o A. _/ s T; A5 q) _+ y. zRepodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast* g# _& ^: }- x. m
base | 3.6 kB 00:00:00 $ m( o# k3 g" E4 A& c
Could not get metalink https://mirrors.fedoraproject.or ... =epel-7&arch=x86_64 error was
' ^+ G4 E# L! }$ a F: s14: curl#35 - "Peer reports incompatible or unsupported protocol version."
: Y" e- q% |4 h2 }extras | 2.9 kB 00:00:00
( y! ?' N- Q7 S. F7 V9 ]updates | 2.9 kB 00:00:00 0 b8 t) `0 J1 t8 ]# i8 S0 ~) h( X
updates/7/x86_64/primary_db | 20 MB 00:00:01 5 g3 y+ m, e& V4 R
Determining fastest mirrors
+ B# g$ ?6 v9 G" o+ l! b * base: mirrors.bupt.edu.cn, u0 E7 H7 ]7 a) e$ l
* epel: mirrors.tuna.tsinghua.edu.cn
% p: n R, ]# B( h! x+ x * extras: mirrors.bupt.edu.cn
2 w: ], r: {4 v1 ~& G * updates: mirrors.bupt.edu.cn
, N H& c0 A* `* g* y( X: J4 @: vResolving Dependencies) c. a0 F# K; M. t5 B Y8 l
--> Running transaction check
9 B4 _+ c- Q' H---> Package dos2unix.x86_64 0:6.0.3-7.el7 will be installed) s8 h& i A# {* K5 b
--> Finished Dependency Resolution
- y. y) t5 i& H- `# a5 @& f2 a9 Z" o' V3 t8 R$ s; v7 h" q7 x
Dependencies Resolved
- h2 Z8 U/ D5 C, @) W, a7 \- e
==============================================================================================================================================================================================% H( k) e: A$ `9 F+ {' |
Package Arch Version Repository Size; u6 m4 H. F, t6 | _
==============================================================================================================================================================================================
+ [" k2 i* e7 y4 d9 A1 BInstalling:
8 G: r5 U; F2 e i6 ?. M o dos2unix x86_64 6.0.3-7.el7 base 74 k- i3 C7 |$ {* w9 z' ?" s% B! ]
M$ P; r q$ U1 ]+ V7 k C
Transaction Summary
8 J. p' d8 j5 s& A==============================================================================================================================================================================================: b; t3 q _$ B# w2 [7 {+ L" r, }
Install 1 Package, p* ]0 r: L, j; O$ g
' z$ f" Q' h! V N* l4 aTotal download size: 74 k
1 F6 H; I* X. mInstalled size: 190 k! ~6 j3 K- D! K
Downloading packages: g& p$ f/ O* Q5 |6 J) r
dos2unix-6.0.3-7.el7.x86_64.rpm | 74 kB 00:00:00 + e/ `2 }2 U2 ~2 |9 N
Running transaction check5 F- P; |& }6 l5 Q6 H2 Y; S U
Running transaction test& S2 Z) b9 o. }% w! K
Transaction test succeeded
/ ~; c: S6 E$ ]/ ^6 N& hRunning transaction
+ v# B% z7 z9 a/ g( g Installing : dos2unix-6.0.3-7.el7.x86_64 1/1 6 K; B1 C! o8 T# T/ P5 H
Verifying : dos2unix-6.0.3-7.el7.x86_64 1/1 . ]# K# `: V* f- J
" n" R! m' k% b1 R: g
Installed:
4 t0 E% w7 g: [; ? dos2unix.x86_64 0:6.0.3-7.el7
- `8 i, G; o' Z* T; p$ Z
; i& a( E, @& UComplete!
5 o' [; |3 Q) M$ q, U
* |! K& X+ c! t; m- ]$ I+ A3 x5 ~) y; R+ ]/ ^
8 R7 d1 ^3 F* z' C( _$ q( g unix2dos example.csv) p/ b; }, L2 ]) f% s4 d
unix2dos 2023-03-10xunjian.csv& r! V; ]8 f5 D" b: p
unix2dos: Binary symbol found at line 1) P: F( B& }. P2 S
unix2dos: Skipping binary file 2023-03-10xunjian.csv, Y# f4 Q! o7 `; e
5 P/ n. e2 q: \0 A" q) v6 d, s
2 ?0 z7 C0 E6 a& p* F2 {7 u# s# }) j8 L# C0 t+ W) W6 H$ B
, {: q/ P- h; P' c0 Z: [, J3 D( y
ssconvert example.csv example.xlsx
% K1 F) x: X5 ]7 {7 O) x! M5 `2 M. ~ ?# s
2 M a [/ ^4 l& u2 `
ssconvert example.csv example.xls
$ l: r- W' L* l$ L+ Y7 a1 M4 J% w# L1 Y: G1 p" R( w3 f
) c% T- J _, d: K
|
|