U beddelo CSV una beddelo Excel (XLS ama XLSX) adoo isticmaalaya khadka taliska ee Windows
Halkan waxaa ah tabobar si loogu beddelo CSV ilaa XLS ama XLSX iyadoo la adeegsanayo khadka taliska (convert CSV to XLS or XLSX using the command-line) gudaha(interface) Windows Windows 11/10 . Waxaa jira siyaabo badan oo loogu badalo faylka CSV qaabab Excel ( XLS , XLSX ). Waxaad isticmaali kartaa Microsoft Excel , freeware beddelka u go'an, ama qalab online ah si aad u samayso beddelka. Laakiin, ma ogtahay inaad sidoo kale isticmaali karto interface-line interface Windows si aad (Windows)CVS ugu beddesho Excel ? Oo, xitaa uma baahnid wax qalab dhinac saddexaad ah taas? Haddaysan ahayn, casharradani waxay kuu noqon doontaa mid aad la yaab leh.
Maqaalkan, waxaan ku tusi doonaa sida aad ugu beddeli karto faylka CSV buug- (CSV)shaqeedka Excel(Excel) . Taas awgeed, waxaan isticmaali doonaa VBScript . Aynu eegno qoraalka iyo tillaabooyinka aad u baahan tahay beddelka.
Sida CSV loogu beddelo Excel iyadoo la adeegsanayo khadka taliska(Command)
Waa kuwan tillaabooyinka lagu beddelayo CSV loona beddelo Excel iyadoo la adeegsanayo Interface Command Line(Command Line Interface) gudaha Windows 11 ama Windows 10:
- Fur notepad.
- Qor Script Visual Basic (VBS).
- Keydi faylka VBS
- Fur Command Prompt galka
- Geli(Enter) amarka beddelka CSV ee Excel .
Aynu si faahfaahsan uga wada hadalno tillaabooyinkan!
Marka hore, ka fur codsiga Notepad kaaga Windows 10 PC. (Notepad)Hadda waa inaad qortaa VBScript oo leh amarro la xidhiidha. Hoos(Below) waxaa ku qoran qoraalka oo dhan oo aad u baahan tahay inaad geliso Notepad(Notepad) ; Kaliya ka koobi halkan oo ku dheji Notepad(Notepad) kaaga :
'====================================== ' Convert CSV to Excel ' ' arg1: source - CSV path\file ' arg2: target - Excel path\file '====================================== srccsvfile = Wscript.Arguments(0) tgtxlsfile = Wscript.Arguments(1) 'Create Spreadsheet 'Look for an existing Excel instance. On Error Resume Next ' Turn on the error handling flag Set objExcel = GetObject(,"Excel.Application") 'If not found, create a new instance. If Err.Number = 429 Then '> 0 Set objExcel = CreateObject("Excel.Application") End If objExcel.Visible = false objExcel.displayalerts=false 'Import CSV into Spreadsheet Set objWorkbook = objExcel.Workbooks.open(srccsvfile) Set objWorksheet1 = objWorkbook.Worksheets(1) 'Adjust width of columns Set objRange = objWorksheet1.UsedRange objRange.EntireColumn.Autofit() 'This code could be used to AutoFit a select number of columns 'For intColumns = 1 To 17 ' objExcel.Columns(intColumns).AutoFit() 'Next 'Make Headings Bold objExcel.Rows(1).Font.Bold = TRUE 'Freeze header row With objExcel.ActiveWindow .SplitColumn = 0 .SplitRow = 1 End With objExcel.ActiveWindow.FreezePanes = True 'Add Data Filters to Heading Row objExcel.Rows(1).AutoFilter 'set header row gray objExcel.Rows(1).Interior.ColorIndex = 15 '-0.249977111117893 'Save Spreadsheet, 51 = Excel 2007-2010 objWorksheet1.SaveAs tgtxlsfile, 51 'Release Lock on Spreadsheet objExcel.Quit() Set objWorksheet1 = Nothing Set objWorkbook = Nothing Set ObjExcel = Nothing
Ka dib markaad gasho qoraalka sare, waxaad u baahan tahay inaad ku kaydiso faylka .vbs faylka kordhinta. Si taas loo sameeyo, dhagsii File > Save As option. Gudaha Save As dialog , u dhig Save As Type to All Files ka dibna geli magaca faylka oo ay ku xigto faylka .vbs . Intaa ka dib, dhagsii badhanka Save si aad u kaydiso faylka VBS .
Hadda, gal gal meesha aad ku kaydisay qoraalka sare ee VBS oo fur Command Prompt galkan(open Command Prompt in this folder) .
Marka xigta, waa inaad gelisaa amar leh syntax hoose ee CMD :
VBSFilename [Input CSV file with path] [Output Excel file with path]
Aynu nidhaahno waxaad u magacawday faylka VBS sida "csv-to-excel", ka dib amarkaagu wuxuu u ekaan doonaa midka hoose:
csv-to-excel C:\Users\KOMAL\Desktop\twc.csv C:\Users\KOMAL\Desktop\twc1.xlsx
Lacalla(xls) haddii aad rabto inaad abuurto faylka Excel oo wata faylka dheeraynta ie, XLS , kaliya ku beddel xlsx xls . Waa kan tusaale:
csv-to-excel C:\Users\KOMAL\Desktop\twc.csv C:\Users\KOMAL\Desktop\twc1.xls
Xusuusnow inaad u baahan tahay inaad sheegto jidka buuxa ee labadaba CSV gelinta iyo soo saarista faylasha Excel .
Markaad gasho amarka kore, waxaad heli doontaa faylka Excel ee soo baxa.(Excel)
VBScript -ka sare , waxaa jira ikhtiyaaro lagu hagaajinayo ballaca tiirka, barafka qaboojinta, buuxinta shaandhada, samee madax geesinimo leh, iwm. Waxaad si fudud u hagaajin kartaa VBScript si aad u habayso xulashooyinkan ka dibna u socodsii amarka si aad CSV ugu beddesho Excel iyada oo loo marayo CMD . Haddii aad tahay barnaamij-sameeyaha, waxaad si dheeraad ah u habeyn kartaa qoraalka si waafaqsan.
Marka, tani waa sida aad CSV(CSV) ugu beddeli karto Excel adoo isticmaalaya Command-Line iyadoo la kaashanayo VBScript uu abuuray Jeff(created by Jeff) .
Akhrinta la xidhiidha:(Related reads:)
- Sida DBF loogu beddelo Excel gudaha Windows(How to convert DBF to Excel in Windows)
- How to convert a Text (TXT/CSV) file into an Excel file
- Dufcaddii bilaashka ah ee PDF ilaa Excel Converter Software.(Free Batch PDF to Excel Converter Software.)
Related posts
Liiska amarrada DISKPART iyo sida loogu isticmaalo gudaha Windows 11/10
Sida loo Bedelo Fiidiyowga iyadoo la adeegsanayo Command-line oo leh FFmpeg gudaha Windows 10
Sida loo soo bandhigo khadka taliska gudaha Task Manager ee Windows 11/10
Sida loo isticmaalo FINDSTR iyo amarrada xargaha ee gudaha Windows 11/10
Gal Serverka FTP adoo isticmaalaya Command Prompt gudaha Windows 10
Sida loo soo celiyo Diiwaanka iyadoo la isticmaalayo Command Prompt gudaha Windows 11/10
Mindida Faylka Swiss waa aalad khadka taliska faa'iido u leh Windows
Dufcaddii ugu Fiicnayd ee PDF ilaa Excel Converter ee loogu talagalay Windows 10
Waa maxay faylalka TBL? Sida loo furo faylasha .tbl gudaha Windows 10?
Sida loo sameeyo sanduuqa sanduuqa Microsoft Excel
Sida loo socodsiiyo Difaaca Microsoft ee khadka taliska ee MpCmdRun.exe
U beddelo Sawirrada u dhexeeya Qaababka iyada oo loo marayo khadka taliska ee Ubuntu
Waa maxay RegAsm.exe? Sidee looga saaraa dll adoo isticmaalaya RegAsm.exe?
Sida loo abuuro Bracket tartanka gudaha Windows 11/10
U beddelo CSV GPX ama KML adigoo isticmaalaya aaladaha wax ka beddelka ee bilaashka ah gudaha Windows 11/10
Sida loo sameeyo jaantuska xariiqda iyo garaafka firdhiya ee sawirka gudaha Excel
Sida Loo Geliyo CSV ama TSV Xaashida Shaqada ee Excel
Soo deji Tixraaca Amarka Windows Guide PDF Guide from Microsoft
Sida loo dilo habka adoo isticmaalaya Line Command gudaha Windows 11/10
Sida loo shido Auto Complete gudaha Dakhliga Amarka Daaqadda