Fabio 'Sooner' Macedo wrote:
> LSJ wrote:
> > XZealot wrote:
> > > Can somebody help me? I tried to update the ARDB database to see if it
> > > would grab the hunter data but I got this message instead.
> > >
> > > Table has 13 columns but 14 values were supplied
> >
> > Open the CSV file in MS Excel or whatever, find the column that is new
> > (the labels should provide a clue) and delete it (or merge it with
> > another suitable column, if that's your thing).
> > Then ARDB can import it.
>
> Good call. But I'm tryng that right now and I've noticed one thing:
> somehow the .csv file has line breaks (or something that Excel
> interprets as such) before all [MERGED] tags.
[...]
> Wait. Now that I checked the library file, I noticed it has tons of
> line breaks inside some columns' content. It comes before [] tags,
> after some periods into card text, and other cases. It's a dauting task
> to find all of them without merging the contents of one line with
> another. Of course, these seem to be usual line breaks you find in card
> texts (after things such as "+1 stealth action.", per example), but
> anyone has a clue how I can make Excel ignore these if they appear into
> text delimitator? ("")
Yes. There are many linebreaks embedded in text fields. Such text field
are wrapped with quotes, per standard .csv conventions. Excel should
handle these appropriately. Recent versions of Excel (Windows Excel
2000 or Mac Excel 2004) do, at any rate.
If your csv reader doesn't rise to the occassion, you could try editing
it by hand, but you'll probably need something stronger than Notepad.
In vi, open the .csv and join every line that doesn't begin with a
double quote to the previous line with the following command (just
start typing -- when you press the colon, the colon-prompt will appear
at the bottom of the screen, allowing you to enter the rest of the
command).
:g/^[^"]/.-1j
(Note that the header line will be spared, even though it doesn't begin
with a quote, since there is no previous line).
Then save the file and exit vi by typing
:x
You can get vim (a vi clone) for windows and other platforms here:
http://www.vim.org/download.php
Or you can try using MS Word:
First replace all paragraph marks with manual line breaks:
Search for: ^p
Replace with: ^l
[Replace All]
Then check the "Use wildcards" box in the search-and-replace extended
dialog and replace the manula line breaks with spaces if the line that
follows doesn't begin with a quote:
Search for: ^l([!"])
Replace with: <spacebar>\1
[Replace all]
NOTE: Use a space before the \1.
Then save the document as text.