All Questions

Tagged with
Filter by
Sorted by
Tagged with
6 votes
1 answer
3k views

Excel-like text import in Python: automatically parsing fixed width columns

In Excel, if you import whitespace delineated text in which the columns do not line up perfectly and data may be missing, like pH pKa/Em n(slope) 1000*chi2 vdw0 CYS-I0014_ ...
tel's user avatar
  • 13.8k
4 votes
3 answers
4k views

Import fixed-width text file into sqlite

What is a good way to import fixed-width text files into sqlite tables, preferably without using peripheral software? E.g. specifying the width of each field Field 1: 10 characters starting with the ...
nacnudus's user avatar
  • 6,428
2 votes
3 answers
295 views

Script to batch find and replace specific text then add 3 spaces after the replaced text in .txt file

I am fairly new to scripting and have searched around on the internet but cannot seem to find a specific solution for what I'm trying to achieve so I'm hoping someone could please shed some light. I ...
Jasdeep's user avatar
  • 79
2 votes
0 answers
452 views

In Cocoa, how can I force fixed-width character spacing on text in a proportional font?

In Cocoa on Mac OS X, I want to create an NSTableView where one column contains Ethernet hardware MAC addresses, and I want the characters of the MAC address in each row to all line up with the ...
Spiff's user avatar
  • 608
1 vote
2 answers
1k views

Reading columnar text data files in Node.js

I am looking for a Node.js package that can parse text data files. The files are not delimited, but instead have the data running in columns. What is this type of file called? Block On Off Miles ...
Jon Wilson's user avatar
0 votes
1 answer
1k views

Windows Batch script * (star) read as text?

I'm writing a batch script to convert a fixed-width text file to .csv format. Here's what I've written so far: @echo off setlocal enabledelayedexpansion for /F "tokens=*" %%A in (HRV*.txt) do ( ...
bweber13's user avatar
  • 370
0 votes
1 answer
65 views

How best to program a 'field colorer' program - quite easy!

Sorry for the weird title, I could't think of anything better! Anyways, I'm half way through writing a program (Windows Forms App) that reads in a fixed-width file, gathers field lengths from user ...
New Start's user avatar
  • 1,411
0 votes
1 answer
676 views

Text occupying more space than needed using flexbox

I'm trying to draw a square next to a multiline piece of text in a fixed width container for a color legend. However, I'm running into the issue that even though the text and the square should fit in ...
Max's user avatar
  • 3
0 votes
1 answer
126 views

Autofill space up to fixed Column width on each line

I am trying to set the column width of each line to a fixed "511" width on a large dataset. If the line has less than 511 column width then I want to add space on the end of the line until ...
Jay Thapa's user avatar
0 votes
0 answers
61 views

Importing text file organised in blocks of fixed width data

I have a text file organised in blocks. Each block starts with two lines with the definition of the block (CMBLOCK,component_name,type,n_of_items) and a sequence of data (of variable size) organised ...
Francesco's user avatar
0 votes
0 answers
653 views

How to make "pandoc" use a specific font when converting a plaintext file to PDF?

After a lot of trouble, I was finally able to run the command without errors: pandoc -i 1.txt -o 1.pdf The result is a PDF with completely messed up text because it uses some other font than Courier[...
user avatar
0 votes
2 answers
194 views

Script to identify specific text and replace with text from another column without effecting column position

I have a .txt file that contains various lines of data which is organised by text starting at specific column numbers - basically a table of data. The below example shows where each column starts: ...
Jasdeep's user avatar
  • 79
0 votes
1 answer
4k views

Read fixed width text file into datatable row by row - C#

I have a large fixed width text file, I want to read it row by row and insert into a datatable, or just read it into a datatable. how can I assign that from which to which position one column will be? ...
Umm E Habiba Siddiqui's user avatar
-1 votes
1 answer
1k views

How to remove spaces from a fixed-width text file in R

I want to load a text file that looks like the following into R, remove all spaces, then rewrite the file. 1 061 061 1 0 081 080 1 0 061 060 1 1 051 051 1 0 101 100 1 The way I'd go about this is ...
Union find's user avatar
  • 8,014