Guest User

Untitled

a guest
Jan 17th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #!bin/bash
  2. echo $(pwd)/employeesdata.xls
  3. Path=$($pwd)/employeesdata.xls
  4. read Path
  5. if [ -e $Path ];
  6. then
  7. Username= [ grep $(Username) $Path | cut -f1 -d `]'
  8. Password= [ grep $(Password) $Path | cut -f2 -d `]'
  9. useradd -- b $Username
  10. echo $Password | /usr/bin/passwd --stdin $Username
  11. fi
  12. exit
  13.  
  14.  
  15. I know it doesn't have the email portion yet.
  16.  
  17. $ cpan App::cpanminus
  18.  
  19. $ cpanm Spreadsheet::ParseExcel
  20.  
  21. #!/usr/bin/python
  22.  
  23. from openpyxl import load_workbook
  24. wb = load_workbook(filename = 'file.xlsx', use_iterators = True)
  25. ws = wb.get_sheet_by_name(name = 'Feuil1') # ws is now an IterableWorksheet
  26.  
  27. for row in ws.iter_rows(): # it brings a new method: iter_rows()
  28. for cell in row:
  29. print cell.internal_value
Add Comment
Please, Sign In to add comment