- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
在linux中,把csv文件转换成excel表格(xlsx或者xls)
& F$ B9 @1 m9 r5 R! w, s3 y* ^! j9 m( \" [2 Q
echo -e 'surname,name,age\nCarlo,Smith,23\nJohn,Doe,46\nJane,Doe,69\nSarah,Meyer,23\n' > example.csv9 ?) J7 ^! I( b$ e# B ^
! Z& g7 I& A% m0 }( ~2 q! H
yum provides unix2dos 8 i6 j4 v, O/ ~0 O6 E5 G
Loaded plugins: fastestmirror, langpacks
% a2 D! Z7 i+ M/ z& l( a$ R3 T3 zRepodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
: n$ y: Q& T; ^- `- ULoading mirror speeds from cached hostfile$ D; ~* t3 B7 g- {. S
dos2unix-6.0.3-7.el7.x86_64 : Text file format converters1 `: J" q9 b* l2 m. |- u: _* [
Repo : local
- y; b/ D0 ^/ \' X. J3 _Matched from:
8 I5 ?; T6 T% e: M/ y) F9 zProvides : unix2dos = 6.0.3-7.el71 o& y( V$ p! @+ X
, x3 s, g0 g; J* @2 S; h; [# h4 a
yum install -y unix2dos
0 T+ ]9 j% B7 s7 |# VLoaded plugins: fastestmirror, langpacks
6 H# |) V9 O! h" ~Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
) K/ s# ]# c7 Q' i3 e" W9 J% d" pbase | 3.6 kB 00:00:00 - A6 T4 w# a0 M# o0 T( F
Could not get metalink https://mirrors.fedoraproject.or ... =epel-7&arch=x86_64 error was1 K, i8 a( r' P g' A3 I1 c
14: curl#35 - "Peer reports incompatible or unsupported protocol version."
, ^: b0 l- w$ R8 I" x! I3 ]8 \2 w8 Rextras | 2.9 kB 00:00:00
# N9 D& w4 E8 d/ f1 \updates | 2.9 kB 00:00:00 " }- r' D- v, @, A
updates/7/x86_64/primary_db | 20 MB 00:00:01 4 X* \# I7 V$ t$ r
Determining fastest mirrors
, Z6 B( `: G, C6 K2 C0 Q0 ~ * base: mirrors.bupt.edu.cn
) S9 {% i( z: c2 s3 `7 w( F * epel: mirrors.tuna.tsinghua.edu.cn0 M0 n: ^ H2 E! l
* extras: mirrors.bupt.edu.cn
% f* l! E5 n' p. o6 X) P8 J( m * updates: mirrors.bupt.edu.cn
* J! f" q6 q! `5 QResolving Dependencies1 }1 f+ T0 Q; e) _; g
--> Running transaction check. U" Q5 Y) i! c. t# J% a) {
---> Package dos2unix.x86_64 0:6.0.3-7.el7 will be installed8 R( e7 M O+ Y9 D8 D( k; m; c
--> Finished Dependency Resolution8 S( M- E8 j, a' J( X3 U
* V, m. r" e; s- `0 s, x3 HDependencies Resolved
0 l5 z9 C- Z- c7 q$ r5 G. k+ F8 s! M
============================================================================================================================================================================================== F) G( _7 R0 r$ f
Package Arch Version Repository Size2 ?% _( T- c8 w" a4 R% [. {
==============================================================================================================================================================================================
) e: j2 V4 h7 y) }, NInstalling:) k; h' e% @9 v2 {9 I6 ]% q* ]
dos2unix x86_64 6.0.3-7.el7 base 74 k
; c) D7 r* n% W9 K- x% W, z. [& r7 a; c3 |/ `3 r; {
Transaction Summary' Z& f& Z" `- D% t* D- S3 X7 |6 G
==============================================================================================================================================================================================
5 ]! L* O5 k6 H. R3 @Install 1 Package1 x/ E- |. ]5 M$ h) K6 O
' t' Z$ }5 W; w( L, RTotal download size: 74 k- M5 S' r4 j7 d
Installed size: 190 k6 u0 |/ ]8 K/ P+ d1 e6 ?' N
Downloading packages:
; N* ?4 F! n# V( n; U8 `8 Ldos2unix-6.0.3-7.el7.x86_64.rpm | 74 kB 00:00:00
) t1 ]: g- J2 g; b2 lRunning transaction check
$ W K. t! z. PRunning transaction test
) U$ A* H' R$ R- OTransaction test succeeded o; n9 F$ t- G2 W
Running transaction
7 P' e0 i2 ?& ^ T( G' u% \ Installing : dos2unix-6.0.3-7.el7.x86_64 1/1 * t* }, ?2 Y8 c2 ^
Verifying : dos2unix-6.0.3-7.el7.x86_64 1/1 . C; A" m O3 u
# [5 N; s' ?9 X. q% o+ O; g# D9 D, O" J
Installed:# s; B' P4 d/ o6 z
dos2unix.x86_64 0:6.0.3-7.el7
, e0 T" w D0 Z' w9 k
3 ?& n1 e' N8 P- [Complete!
2 V2 c5 N, R) Z; Y' H5 k. O, [$ G6 A) Q: j3 B Y6 n! d& B
/ g, ^9 K% G4 n! L; r2 o
, ]; @1 t; x' c! B! J unix2dos example.csv: C" p+ ~: j9 {, e9 j
unix2dos 2023-03-10xunjian.csv8 l$ U& _, H' F) @0 u2 |, e
unix2dos: Binary symbol found at line 10 X' [) N2 t$ i/ X' k' {
unix2dos: Skipping binary file 2023-03-10xunjian.csv2 F3 m6 A: O* F7 G3 O4 s) w+ P$ B
9 J' r m; x. v3 P9 y
$ X- s4 N! v, C' R7 b5 X0 m1 c' @+ S7 Y3 `6 l" G6 v3 Y4 F
) {& L7 s4 j8 P- t3 Ussconvert example.csv example.xlsx$ g; [4 _) o7 F7 G8 A+ p
' H: x/ @0 `/ g2 x8 W1 ^3 W
2 I$ X, M: k6 V: @ b ssconvert example.csv example.xls: ~2 M' R. n, `
* [9 f( L% l& M
1 Y' F' F( X( `3 @ |
|