[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

how to program this

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 1

File: Jellyfish.jpg (758KB, 1024x768px) Image search: [Google]
Jellyfish.jpg
758KB, 1024x768px
Hello sweet folks,

I want to:
>take text from cells ("NAME SURNAME" type) or a list in a word document
>copy paste a single cell into a specific position in a word file [blablabla NAME SURNAME blablabla]
>save the file as NAME SURNAME.doc into some folder I created


how can I do this? Do I need a programming language like python? (I figured that would be the easiest to learn in a day or two)

love you guys
>>
and of course repeat that cycle until the last name in the list
>>
This is doable.
Break down your problem into parts: How would you extract data from an xls file?
Then google that with the keyword 'python'.

Then how would you store this data in some kind of array?
google that.

Then how would you access a word document?
Then how would you find the place the name needs to go?
Then how would you get python to take the name, put it in the position, and take that and save it as a new file?

You have some googling to do. If you've never programmed before, go through a really basic python intro to learn things like loops, conditionals, arrays, variables.
>>
>>59047492
Can be done with script in excel or libreoffice, i think.

But a real programming language might be less painful.
>>
>>59047540
thanks I didn't even know what to search on Google.

I did some simple things with visual basic long time ago
>>
I've had a lot of luck manipulating excel data with a Python library called pandas.

It's mainly designed for data analysis, but pandas.DataFrame.read_excel() and pandas.DataFrame.to_latex() would work, followed by pandoc latex -> doc.

there might even be a way to spit word tables out of pandas, but I'm not sure.
>>
>>59047574
yeah I prefer to learn how to code so in the future I can make "boring" jobs more interesting :)
>>
>>59047620
wink wink wink
>>
>>59047601
VB is not worth doing anything with unless forced to.

PS: You might be able to do this procedure faster with autoit.
>>
>>59047492

It's literally a few lines of code in VBA.

You could do it in something like Python, but VBA would be the easiest solution here.
>>
>>59047620
Sure? Unfortunately until you're experienced and have a big job or when you just have a very big job, often coding isn't the fastest way.

PS: In case you want to solve this problem here with Java, Scala or such a language, one of these libs will help:
https://java.libhunt.com/project/apache-poi

Should be pretty easy to do what you asked with these.
>>
>>59047667
Yeah in this case it would be faster to do it manually than learning how to code but next time I could capitalize on the time I spend sitting in the office doing nothing :)

Will also look into java, thanks
>>
>>59047904
Sure. It'll be a bunch of effort but it is often worth it I guess. Plus doing things the clever way can be less of a grind in general.
>>
>>59048037
being lazy the smart way ;)
Thread posts: 14
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.