Updating tkinter widgets created in a for loop to replace the previously entered values and then save to csv python - pandas

I have created a for loop that creates 10 widgets (mix of entries and comboboxes) and I am able to save these to a csv file no problem. But I am trying to be able to update these values, by eather saving replacing the previously saved csv file using pandas or ideally reaplcing a sepcific cell.
I created a for loop to achieve this the olde values are saved and not the new ones. Please help. Thanbk in advance!

Related

Select The data from Dynamic Dropdown in Macro file

I am working on Macro excel file in which multiple dynamic dropdowns are there for every column.
I have 2 excel file ,one is input file and another one which I need to update on the basis of requirements.
I need to pick value one by one from input file and then check it from dropdown values of excel-2.
If that value doesn't exist in dropdown then bot needs to skip the entire row and move to next one.
I am not able to understand that how to fix it.
Please help me to resolve this issue.
Thanks in advance.
Nidhi

Exporting long numbers to CSV file for Excel

This is perhaps one of those many times discussed questions with solutions more specific to actual system that outputs the data into a CSV file.
Is there a simple way to export data like 3332401187555, 9992401187000 into a CSV file in a way that later when opened in Excel, the columns won't show them in "scientific" format? Should this be important, the data is retrieved directly by an SQL SELECT statement from any DBMS.
This also means that I've tried solutions like surrounding the values with apostrophes '3332401187555' and the Excel cell recognizes those as text and doesn't do any conversions/masking. Was wondering if there was a more elegant way without actually it being a pre-set Excel template with text data fields.
1. Try exporting the numbers prefixed with single quote. Example: '3332401187555.
2. In excel, select the column containing number values
and then select Number in Format Cells.
Just have to save your file with Excel the option CSV file. And you have the in file in requested format.

Automated formatting CSV files using an Add-In in Excel 2010

I have a C program that generates CSV files as output.
For example - I have 12 CSV files; one for each month. First column is Employee Name and Second column is their respective salaries. Assume there are 10 employees.
I want to format the 'salaries'column such that if a cell has a value over 10,000, the text should become green. Else it should remain blue. I have been able to do this using VBA for one file by adding a Command Button in the file and writing a small script.
However the issue is, every time I run my C code, it will generate a new set of CSVs; overwriting the existing ones. Besides, I want to apply such formatting to other CSV files I intend to generate.
I read that a .xla Add-In (which can exist on its own unlike embedded VBA macros in an Excel sheet) might be the solution.
I have 2 questions -
1. Is it possible to do with Add-Ins?
2. If yes, then I wanted to create a single batch file which would first generate the CSVs, and then run the Add-In on it. Is that possible too?
Thank You.

Import a CSV file into Access using VBA

I need to use VBA to import a large CSV excel file into an Access table. The delimiter is "" (double quotes) except for some reason the first value is followed by " (only one quote) instead of two like every other value. The first row contains the column headers and are delimited the same way. At the bottom I have attached an example.
The CSV files are generated automatically by an accounting system daily so I cannot change the format. They are also quite large (150,000+ lines, many columns). I'm fairly new to VBA, so as much detail as is possible would be much appreciated.
Thanks in advance!
Example of format
That doesn't sound like a CSV file. Can you open it in Excel, convert it to a true CSV, and then import that into Access? You will find many VBA-driven import options at the URL below.
http://www.accessmvp.com/KDSnell/EXCEL_Import.htm
Also, take a look at these URLs.
http://www.erlandsendata.no/english/index.php?d=envbadacimportado
http://www.erlandsendata.no/english/index.php?d=envbadacimportdao

Validate in excel before uploading to access

I am attempting to upload an Excel document into Access. I have used VBA to unhide all columns and rows and then delete columns and rows that are not being used. All of the worksheets upload into Access properly except one. This particular worksheet attempts to upload a field and label it Field 12. I am unable to find a way to delete this field. Any help?
It is probably the first column after your data...
Try either in VBA or in Excel deleting the columns to the right of your data (not just contents but an actual delete). I've found this typically happens when the columns to the right of your data contained data at one point and Access / Excel sees those as still containing data. Then try your import again.
Alternatively, you could upload into a new Access staging table before pulling your desired known columns into the final table through an INSERT query. Then you can delete the staging table if you like or delete it before the next import. In this way, each import can have its own "added columns".