Posts by dot.Py • 985 points
31 posts
-
1
votes1
answer205
viewsA: Doubt Search VBA Record
You can use the formula VLOOKUP (or PROCV en) to find the required data in the same row in column B. Syntax: VLookup(parametro_que_quero_encontrar, range_que_quero_procurar,…
-
0
votes1
answer415
viewsA: How to execute a VBA command on a sheet with a specific name?
According to the documentation, can call the method .Activate, which is equivalent to clicking on the spreadsheet tab named as "Plan1" in your workbook. Worksheets("Plan1").Activate Instead of…
-
2
votes2
answers2259
viewsA: Format output Excel - Python
The pandas library has a guide on how to work with styles, but warn that it is a new feature, implemented from version 0.17.1. In this link I provided you can find snippets of code to paint, create…
-
2
votes1
answer1145
viewsA: How to use Selniunhq to fill out forms with php?
Your question is very broad, however I will try to help you. You can use a combination of: Python + Selenium to browse and populate the forms. If you need to gather information from open pages, you…
-
0
votes3
answers1130
viewsA: Take the selected value in a cell and subtract with the combobox value in vba
You said that "by placing the value in the cell changes the value of several cells and not only the selected cell", correct? This is because the passage... For I = 3 To…
-
0
votes1
answer119
viewsA: Difference between maxiter and maxfun parameters in function fmin_l_bfgs_b
I may be wrong, but when you optimize a function, you may have to evaluate the optimal value of outputs by performing several 'evaluations' each 'iteration'. In an interaction of the algorithm…
-
1
votes1
answer262
viewsA: Python returns "Dead" when trying to read json > 240mb
As his JSON eh a little big, while trying to read it in memory, your PC may crash due to lack of memory. So try to change the line where you read the JSON: jsonToPython = json.load(data_file) to use…
-
2
votes1
answer762
viewsA: List only files without folders in Python dirétorio
According to the answers of that question and of that other question, you can use commands like: Cod1: from os import listdir from os.path import isfile, join mypath = '/home/' onlyfiles = [f for f…
-
0
votes1
answer517
viewsA: Read XML tag blocks based on a search
You can use the library BeautifulSoup to browse between the tags of your XML file. It could use other libraries as well, such as xml.etree.ElementTree, minidom or the lxml, for example. Code: s =…
-
1
votes1
answer1359
viewsA: How to pick up text, in CSS element receiving 2 class
Danilo, better analyzing the page you spent on Chrome, at the inspecionar the item "80 Users", click on the tab Network and then in XHR and in JS, by redoing the request to the website (F5), I could…
-
11
votes2
answers7126
viewsA: How to create an executable for a python program that installs the used libraries?
Looks like you want to compilar your source code in an executable. If your code has been written to python 2.x ou 3.0-3.1, you can use, for example, the library py2exe. To create the executable, you…
-
1
votes1
answer788
viewsA: How to collect text when there is no HTML reference class - Crawler Python
You can use the library Beautifulsoup at the command .find_all() to extract all tags td of a website, without specifying any class, name or id, for example. Code: from bs4 import BeautifulSoup…
-
3
votes1
answer123
viewsA: How to extract the icon from a . exe file using python?
According to that answer, you can use the code below. I tested it here and it worked perfectly. Code: import win32ui import win32gui import win32con import win32api ico_x =…
-
0
votes2
answers1885
viewsA: How to create a board of user-determined size and present it as text using python?
See if it helps you, I commented on the code to give you a sense of what’s going on. My suggestion is that you run part by part to understand the functioning Code: #pergunta a qtd de linhas e…
-
1
votes2
answers86
viewsA: Stalled Selenium test
Take a look at that link. He teaches about methods .implicit_wait(), .explicit_wait() and .fluent_wait(). Has this topic in So_en tbm that can help you. Another idea, for example, is to use a…
-
1
votes2
answers477
views -
1
votes3
answers13786
viewsA: VBA: Use Excel to rename files in a folder
Assuming: One file per line Only one point in the file name (the point separating the extension from the file name) Turn the following macro to list all the files in a directory in the cells in the…
-
3
votes6
answers14517
viewsA: How to define the largest prime number within a given number?
You can use the function created by Miguel in the post cited in the comments: Code1: def maior_primo(n): for num in reversed(range(1,n+1)): if all(num%i!=0 for i in range(2,num)): return num…
-
2
votes1
answer2823
viewsA: VBA: Putting a space before or after uppercase letters in a given text
I created this function in VBA for you: It will check that each letter in the name is capitalized. If so, it will add a space before the letter in question. Code: Function separa_nomes(str As…
-
1
votes1
answer1629
viewsA: Putting password in a python file
I believe you can use a library like the Pycrypto to encrypt and decrypt your file with a password. Take a look in this topic and in this also. Create a function to proteger() and one for…
-
2
votes1
answer444
viewsA: Reading CSV with Python
Algorithm: open the input file create the output file for each row of the input file, if the line is equal to the text sought by you, show "I found it!" message to the user write the input file line…
-
2
votes2
answers972
viewsA: Python fill values with data from other lines
Lucas, this process is called interpolação. How your data is in the format of dataframe, take a look at the Docs. And also take a look at the part that talks about How to Work with Missing Data.…
-
1
votes1
answer418
viewsA: How do I go through the Firefox Insecure Connection alert page with Geckodriver?
I don’t know much about Selenium in C#, because I’m more adept at the version for the Python, but the idea serves both. Try to absorb the idea and figure out how to reproduce in C#. How to add the…
-
0
votes1
answer3141
viewsA: Update dynamic table last. VBA
According to that answer, we see that a possible solution p/ your problem may be the following: In Propriedades de Conexões, clear the option "Enable Background Refresh" or "Habilitar Atualização em…
-
3
votes2
answers2106
viewsA: How to calculate time intervals in excel
You can create 2 auxiliary columns to facilitate understanding of the problem. In one of the columns, you will check whether the COD.REVENDA of the line in question is equal to 1, and COD.REVENDA of…
-
4
votes1
answer1035
viewsQ: How to move the mouse automatically, realistically, using Python?
How to make the mouse move automatically, realistically, using Python? I was able to find and change a code that produces a "V" movement on the screen. However, I would like to move the mouse using…
-
2
votes1
answer693
viewsA: Is it possible to recover the selected values from a multiselect (not active X) list box?
Yes, it is possible. You should create a loop p/ check each of the items in the listbox and do what you want. COD 1 Dim k As Long Dim s As String For k = 0 To List1.ListCount - 1 If…
-
1
votes1
answer54
viewsA: Doubt about dropdown menu WORDPRESS
Depending on your Wordpress theme this is customizable in the theme customization menu itself. But that aside, you can use one of the following alternatives: Change the item link Cursos, that is in…
-
2
votes4
answers5196
views -
7
votes1
answer1862
viewsA: What’s wrong with this python code?
Your code is producing the following error: TypeError: send_to_twitter() takes 0 positional arguments but 1 was given Analyzing the message, we see that this is a TypeError, that tells us that the…
-
4
votes4
answers3163
viewsA: Removing spaces in input fields
Based in that reply, we can see that using HTML and JS is possible. See how: HTML <input type="text" id="telefone" maxlength="10" /> Javascript var telefone =…