Questions tagged [txt]

txt is the conventional filename extension of text files.

1467 questions
-1
votes
1 answer

How to convert txt file to excel and vice versa in Python?

I have file with lacks of line of data in excel. I want to process those by converting in text file and then creating 3 excel files from that original 1. I need help to convert txt file to excel and vice versa in Python. Kindly help me.
prasad-jpg
  • 21
  • 1
  • 5
-1
votes
2 answers

Extract data from a .Txt file and show it in a Queue and Stack in Java

I need to read data from two .txt files and then sort its data as a queue or a stack. I know how to use queue and stacks but my problem is how I can open and use the data from the txt files. Example File1.txt = A B C File2.txt = D E F --Stack= C B A…
-1
votes
1 answer

How do I save link in .txt file?

try: links = driver.find_elements_by_xpath('//div[@class="s-item__wrapper clearfix"]//a[@class="s-item__link"]') for link in links: print(link.get_attribute('href')) I want to save all links file in txt file
-1
votes
1 answer

How to copy a list of folder names in a folder to text file in Powershell?

I have a folder, folder A in a file path, inside folder A are multiple folders (folder 1, folder 2, folder 3). I want to create a Powershell script that goes to the file path where folder A is, read the names of the folders in it and create a .txt…
ripndip
  • 11
  • 3
-1
votes
1 answer

Splitting Variable and merging .txt files using .Batch

I thought I could do this, but this is just not my profession. Below, I am trying to take the second column of data and produce a .txt (.csv) which separates the second column into two columns. There is a comma present in the data but it is…
-1
votes
2 answers

Displaying text backwards

I am trying to display text file backwards line by line. I want to do this with char and dynamic allocation. I allocate a 2d dynamic array for this purpose. But the problem is that every line I read in the erase the precedent. This is my code : int…
rcoding
  • 9
  • 1
-1
votes
1 answer

Read grades from Grades.txt file and save best grades to BestGrades.txt

I need to read the best grades from the Grades.txt file and save the best grades of individual students in the BestGrades.txt file. Unfortunately I can only view student data on the console. Could someone help me? using System; using…
WooFix
  • 11
  • 2
-1
votes
1 answer

How to read a specific amount of lines in a file

I have a school project where I want to make a password holder(nothing special I will attach all the code down below) and I don't know how to read a specific amount of lines from a text file. More exactly I need the user to input the name of the…
-1
votes
1 answer

C++ Change a word to another

I want to write a tool to change the word to another one, as I give! It matches that already some day and all the time there is a problem that my word is cut off or something is wrong. then I want a better program with the use of std :: regex but I…
Eriss69
  • 69
  • 5
-1
votes
2 answers

How to split a video in parts using Python?

I need to split a video file of any size into various parts of maximum size of up to 75 MB. I found this code, but it doesn't work: import cv capture = cv.CaptureFromFile(filename) while Condition1: # Need a frame to get the output video…
-1
votes
2 answers

FileReader not reading entire text file

I want my code to read a txt file and print out each line, but nearly half of the lines are being skipped over seeming randomly. How do I ensure the entire file is read? BufferedInputStream readIt = new BufferedInputStream(new…
6haune
  • 1
-1
votes
1 answer

txt to csv attempt. cannot understand the TypeError from re

I am trying to convert this file https://bpa.st/SNPQ into a CSV file. I have spent a long time putting this code together but I don't understand why it is failing. import re f = open('PRM93052012100845','r') text = f.readlines() text =…
-1
votes
1 answer

How to read columns (Tab) in txt files and create lists? Python

I'm starting to get familarized with Python and I wanted to learn how to read a txt files, like the ones that are obtained from other software, like LabView, which normally have the following structure. Headline Other information Temperature 1 …
CeliaL
  • 3
  • 1
-1
votes
1 answer

How to write jbyteArray( or byte array) to txt file c++?

I have an image in a form that jbytearray in c++. I need to write it to txt file. I did many solutions on stackoverflow but none of them worked for me. when I cast jbyteArray into char *, it is successfully write it, but i need to write it as a…
ozer
  • 241
  • 2
  • 12
-1
votes
3 answers

Java: unable to store every paragraph of a .txt file. in a ArrayList>

The main goal is to store every line of a paragraph included in .txt file to an ArrayList until we stumble on an empty line (line that only contains the string ""). After storing the whole content of the paragraph into the ArrayList , we store the…