I am trying to export xls into dbf via Libre command line with this line :
scalc --invisible -convert-to dbf MATIKGL.xls
File is converted and it's functional except Libre changes header (first row), where the column type (C for character, N for numeric) and maximum size of the field is defined.
E.g. column size is 19 (max 19 character in cells for that column) but Libre reads the largest input in that column, counts number of characters of that specific input and changes it from 19 to for instance 10.
How to tell Libre from command line to skip changing first row (header)?
One more thing, even if I try to change field size to 19 in DBF manually using Libre scalc and save that file, when opened 19 is once again changed.
Related
I am using a table from an excel file which has a TEXT column "Service Code".
When I upload the data into Power BI, it automatically changes the field type to number and removes leading zeros. For Example, "000230" becomes "230", and "010000" becomes "10000". I created a custom column and used = Number.ToText([#"Service Code"],"000000). This worked as all values in the column are 6 digits long, however, a few of them have a letter at the end which is causing error. For example,10014A or 10017Z. Is there a way to do this without causing error?
Service Code
Custom
Desired output
230
000230
000230
10000
010000
010000
10014A
Error
10014A
10017Z
Error
10017Z
I used the "Custom Column from Examples" feature in PowerQuery and typed in the first two required values.
It created this formula:
Text.PadStart(Text.From([orig], "en-US"), 6, "0")
I have a EBCDIC (Mainframe) VSAM file without any carriage return. It is like a million characters long.
With SSIS, could I loop on the file's single line and add a carriage return each time I hit the SIN of the first record type? (record control type starts with 90)
I have not found any doc on this particular function or if it is possible at all.
I'm not familiar with VSAM or what the SIN token is but you should be able to use a normal flatfile connection but change the new line identifier from carriage return to the SIN. The default end of line token is "{CR}{LF}"
The flat file connection would then treat the SIN's as carriage returns and align your file accordingly
Here is my "VSAM" file with SIN as the carriage return token
Create a flatfile source and set the column header row delimiter token to SIN
Next set the row delimiter to SIN
Hit refresh columns to align everything
Using VBA or Interop.Word I would like to simply parse the text in a Word document line by line, regardless of whether the text in that line spans multiple columns. As per the example below, I want:
Line 1 = "Line 1 Line 5"
Line 2 = "Line 2 Line 6"
Line 3 = "Line 3 Line 7"
etc.
I can't find any method, property or object in the Word Object Model that can facilitate this. I tried exporting to PDF and then opening that same file again in Word, but the conversion does not retain the original text line by line and gets very scrambled in places.
As per my comment above: a workaround is to try to get the document recreated using layout mode. In this case the Word file came from an export of an Adobe PDF scan of a printed document, so it's only applicable in these situations.
I need to import an excel 2007-2013 file into MSSQL but the characters are being truncated within a column. The quick fix is to sort the rows from largest to smallest interns of character sting length.
I require a permanent solution and the following answer (see below) worked for .exe files however what will be the corresponding solution for .xlsx files.
Thanks
Chantelle
To change the value of TypeGuessRows, use these steps: 1.On the Start
menu, click Run. In the Run dialog box, type Regedt32, and then click
OK. 2.Open the following key in the Registry editor:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel
Note For 64-bit systems, the corresponding key is as follows:
HKLM\SOFTWARE\wow6432node\microsoft\jet\4.0\engines\excel
3.Double-click TypeGuessRows. 4.In the DWORD editor dialog box, click Decimal under Base. Type a value between 0 and 16, inclusive, for
Value data. 5.Click OK, and then exit the Registry Editor.
A second way to work around this problem (without modifying the
registry) is to make sure that rows with fields, which have data 255
characters or greater, are present in the first 8 rows of the source
data file. shareedit
answered Jan 20 '14 at 11:21
Suji 112
I have a scenario and would like to see if anyone has any suggestions on how I should tackle it. Basically I have a directory full of files, document names consist of [Code]-[number]-[text]
CODE - A generic 3 letter code.
NUMBER - a number generally 4 - 5 digits in size.
TEXT - original document name (Before it was dumped).
CODE, NUMBER and TEXT are separated by a colon (-). Number always starts at the 5 character.
I would like to somehow scan that directory and extract the number from the filename, I would then like to compare that number to a field in a database (SQL query fairly straight forward, could also extract as raw text) If the number matches the number in the database I would like to separate those files.
If I need to clarify anything please ask. I wasn't sure if this site is appropriate for my query.
Open the root folder, click in the file explorer path (in open space off to the side so the whole path gets highlighted), type cmd and hit enter to open a command prompt from that folder location.
Type: dir /b /s > filelist.txt to get a list of all file names. You can exclude /s if you don't need/want to dig down into subfolders.
I'd paste that into excel, if you have 2013 you can just start typing the part you want to extract, after you type the full first line when you start typing the next line it will recognize the pattern and you can just hit enter to fill down.
Otherwise, use Data > Text to Columns and specify - as a delimiter.
Likewise you could just import the filelist, separate them in SQL using SUBSTRING() or similar. When you have your matching filenames you can just use some concatenation to build a COPY or MOVE .bat file, pretty easy in SQL or Excel.