Add Tools
This commit is contained in:
parent
3ce84a0a09
commit
0eccd43793
|
@ -0,0 +1,15 @@
|
|||
import csv
|
||||
import openpyxl
|
||||
|
||||
wb = openpyxl.Workbook()
|
||||
ws = wb.active
|
||||
|
||||
csvfile=input("Input CSV File Path:")
|
||||
xlsxfile=input("Input Xlsx File Path:")
|
||||
|
||||
with open(csvfile) as f:
|
||||
reader = csv.reader(f, delimiter=',')
|
||||
for row in reader:
|
||||
ws.append(row)
|
||||
|
||||
wb.save(xlsxfile)
|
|
@ -0,0 +1,22 @@
|
|||
#include <iostream>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
|
||||
int main(){
|
||||
char filename[512],filename1[512],extbuf[512];
|
||||
std::cin.getline(filename,512);
|
||||
std::cin.getline(filename1,512);
|
||||
FILE *fp,*outfp;
|
||||
fp=fopen(filename,"rt+");
|
||||
outfp=fopen(filename1,"wt+");
|
||||
if(fp!=NULL){
|
||||
fprintf(outfp,"static const char * const supported_globs[]={\n");
|
||||
while(fscanf(fp,"%s",extbuf)!=EOF){
|
||||
fprintf(outfp,"\t\"*.%s\",\n",extbuf);
|
||||
}
|
||||
fprintf(outfp,"NULL\n};\n");
|
||||
}else{
|
||||
std::cout<<"Error!"<<std::endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue