Giter VIP home page Giter VIP logo

csv's People

Contributors

hi5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

csv's Issues

[Enhancement] Would be nice to have an efficient way of deleting multiple columns and multiple rows.

In my case I have a CSV with 97 columns and 2740 rows.

I need to delete columns:

3  ,4  ,5  ,6  ,7  ,8  ,9  ,
11,12,13,14,15,16,17,
19,20,...

And I need to delete rows greater than 31

I.E. Deleting 99% of the original CSV. With the current process of deleting 1 row at a time this is pretty slow.

Deleting all rows > 31, in this case is simple! %CSV_Identifier%CSV_TotalRows := numRows.
Deleting the columns however is a little more tricky.

I'm envisaging:

CSV_DeleteRows(identifier,greaterThanID,lessThanID){...}
CSV_DeleteColumns(identifier,greaterThanID,lessThanID){...} 

or perhaps better still:

CSV_DeleteRows(identifier,[[greaterThanID,lessThanID],[greaterThanID2,lessThanID2],...]){...}
CSV_DeleteColumns(identifier,[[greaterThanID,lessThanID],[greaterThanID2,lessThanID2],...]){...} 

Thoughts?

Way to unload CSV from memory

I don't see option like this, and it seems like Loading another file over the same Identifier just appends to already existing data.

Last column not being detected

I am a beginner to Autohotkey and I though this library would help me complete what I wanted to do. Currently, I am just reading in a tsv file (tab separated value file). The file seams to load. When I output the headers, the message box is missing the last column.

Script Source Code

#include csv.ahk
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

csv_filename := "timecard2.txt"

FormatTime, CurrentYear,, yyyy
FormatTime, CurrentMonthDay,, MM-dd
FormatTime, CurrentWeekday,, ddd
FormatTime, CurrentTime,, hh:mm
Week := SubStr(A_YWeek, -1)

CSV_Load(csv_filename,CSV,"`t")

row := CSV_ReadRow(CSV,1)

Msgbox %row%

Data file

Date	Clock-In	Clock-Out
2022-45-11-07-Mon	07:21	04:37
2022-45-11-08-Tue	07:05	04:19
2022-45-11-09-Wed	07:07	04:13
2022-45-11-10-Thu	07:04	04:02
2022-45-11-11-Fri	07:07

Files

time_punch - Copy.txt
timecard2.txt

CSV_Identifier name collision with multiple CSV files

HI, just to start, this CSV library is great and does a lot of good things.

I think I found an issue when you try to use CSV_Load on two different .csv files in one .ahk program.

The second call of CSV_Load, the CSV_Identifier overwrites the first CSV_Identifier.

You can still access the data members of the second CSV_Identifier but use the first CSV_Identifier.

EX

CSV_Load("\Job Folder\jobFolderPaths.csv", JobFolderPathData,",") -> JobFolderPathData is the 1st CSV_Identifier

CSV_Load("\Job Folder\JobListPath.csv", CompanyIndex ,",") -> CompanyIndex is the 2nd CSV_Identifier

If you call CSV_FileName(JobFolderPathData) (1st CSV_Identifier) you will return the file name of CompanyIndex (1st CSV_Identifier)

This issue persists even if each CSV_Load() is in it's own .ahk file.

Thanks
EB

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.