How to create a link that downloads a new file instead of opening the source file (rmarkdown) - r

My rmarkdown code produces a html document. This document lists out the process that needs to be followed by front line staff at month end. The process flow requires users to open xl files, update a few fields (such as report month etc) and then run macros.
I have used hyperlink to the original XL files as follows
[click to opel xl file](path/and/file names)
The above link opens the original file and the user is able to
overwrite the original file, I don’t want this to happen.
I want the hyperlink to generate a new file that would be downloaded
so that nothing happens to the original file. How to do this?
Please could you kindly help me out.
Thanks in advance

After extensive research, this can't be done using conventional rmarkdown!

Related

Cannot place custom items on client hotbar/toolbar

Whenever I make a custom item, I am unable to drag it onto a hotbar. When I try to pick it up the icon turns to a question mark and will not stick to a hotkey.
For example, I made an exact copy of the Murloc Costume (id 33079) at id 50017 (which was a free slot on my DB). The original I can put on a hotbar. The custom one I cannot.
Here's a gif of the issue
Answer: if it's not in the client side DBC's, it will not work properly.
From ReynoldsCahoon on the AC Discord:
I just modified a DBC recently. I had to use a tool (I used Ladik's MPQ Editor) to extract the specific DBC I wanted to modify, and then I used WDBX to open the DBC and manipulate it. In WDBX you can output it in a variety of formats (like CSV or SQL) so you can modify the values any way you like, and then reimport (via CSV or SQL) the values back in.
I loosely followed the guide here: https://model-changing.net/tutorials/article/23-41-creating-your-first-mpq-patch/
I exported a DBC containing all of the Character Titles in the game. Erased all of them, and then imported a bunch of new values of my own choosing. Instead of importing that back into the MPQ I got it from, I created a new MPQ called patch-4.mpq that I placed in my client WotLK/Data/ directory, and then on the server, I placed the DBC file into the worldserver/data/dbc/ directory, replacing the original DBC.
I think this can optionally be overwritten in the database, by using the associated _dbc table to override values from the dbc files (someone correct me if this part is wrong).

create .pdf files automatically centura

i'm working in Centura 2.1 team developer and I want to generate (.pdf) files direct from the system and every .pdf file has a unique name according to the data inside this file.
how can I do it ?
Try to look at the page:
https://samples.tdcommunity.net/index.php?dir=
Here is a lot examples working with PDF.
After TeamDeveloper v5 you can use SalReportPrintToFile() which creates a PDF.
Otherwise you could install PDF995 ( free ) and call some of its many functions if you don't want to use Acrobat Writer ActiveX.

Customize IBM DiffMerge to export a custom Report

I am using IBM DiffMerge to generate a Report that shows all differences between two .cls files or .sbs files. I was playing with it and I saw that there is a filed in option menu that allows you to change the format of the report, but it implies some keywords, like $elemname to print the element's name or $elemtype to print its type $leftonly or $rightonly which show how many differences are in the left diagram or in the right one.
Now, I was wondering if there are more variables like those above, especially one that can print a component's GUID (unique ID in Rhapsody).
Thanks,
Daniel
I would expect that $GUID will give you what you're looking for.
Under the ReporterPlus installation folder there is a folder named Templates. In it you'll find a file named DiffReport.dpl which you can load it into ReporterPlus for editing like any other template. You must run Rep+ with a command line option so that it loads with the Diffmerge specific schema:
Reporter.exe /mode=dfm
After that you can load the Diffmerge template, and edit it to customize the output of DiffMerge reports. When you do, try adding $GUID into the output.
Regards, Simon

Batch file write to txt

I want to make a batch file that will ask user for input, than write that input to a specific position in an already written txt file(called commands.txt which contains query) and call sqlite3 < commands.txt
I need this so inside the commands.txt where the query is, in LIKE 'userinput' i will add the users choice (parameter)
Although your question is not really specific enough and verging on the kind of inappropriate question that for stackoverflow (it does not include code), as hinted at by the comment, I'll take it at face value and assume there is much you need help with.
First let me deal with the question "I need to make a batch file"
A batch file is a simple text file with the extension .bat. You can create it with a text editor like notepad. We do not know what kind of system you have (Windows, linux, Mac etc) but lets assume Windows as you asked for a batch file. We do not know which version of windows (7 or 8 etc), So I'll try and be generic.
All windows machines come with a simpe text file editor called notepad. You can open this by typing notepad into the search box on windows 7 or 8. Lets start with a simple batch file:
:: This is a batch file
#echo off
echo Hello World
exit /b
Type (or paste) those 4 lines into notepad. Now select the file menu and select Save As, now in the Save As Type: selector choose All Files. In the File name: box type the desired name with the bat extension, such as doit.bat. Ensure you choose a suitable directory to place your new batch file. Leave the encoding as ASCII. Click Save. You have now made your first batch file.
Now you need to execute that batch file. Using the Windows File Explorer find the folder where you saved that batch file. While viewing the folder, hold down the shift key on the keyboard and then right click in the background of the folder and select Open Command window here. You will now have a command prompt window. You can now execute your new batch file by typing its name doit. It will display:
Hello World
OK - Now you have created your first working batch file.
Now for the next part; Asking the user for input. This is done with the set /p command. Add this to your batch file (before the exit line):
Set /P Like="Give me your input: "
echo Your input was: %Like%
That has solved the second part. Now the third part, edit the commands.txt file. If you do an internet search for a similar problem (editing files in batch files) you might find this help page: http://www.ousob.com/ng/edlin/ng96d9.php. This shows a generic way of changing any text string to any other in a file using EDLIN from a batch file; unfortunately EDLIN (and EDIT) are no longer included in windows so these batch files are not much help.
A search of stackoverflow finds similar queries which contain an answer for you.
So now you have all the parts of the answer:
How to make a batch file
How to prompt the user for input
How to replace lines of text in the commands.txt
You should be able to put it together and get it to work....

Converting RTF to PDF from System

I've createad a rule to transform any file to PDF and copy this one to another folder.
So i can add a file named: "test.rtf" and then the rule create a test.pdf into folder "PDF"..
Till here its ok. If i add a file through alfresco (add content button) it works perfectly...
By the way, on the system that i've developed when i try to add a file then i get my file .rtf correctly in the folder, but the pdf file converted and copied goes without any content...
If i send a rtf file with a table with 10 rows and into the rows i right "testing" then the pdf created goes with the table, and with 10 empty rows...
Someone knows the reason for that?
Im not sure, but maybe when i send the file by the system alfresco starts to convert and copy before completing to create the rtf... someone already got some problem like this one?
The problem you're getting in is that Alfresco first creates an empty file with all the meta-data and then updates the file with the associated content.
So you can do 2 things:
1: create a rule which is triggered on update, instead on create/inbound
2: create a rule which triggers a Javascript file, which will do the transformation and will check on the content size.
Hence it's better to create a rule which checks the content on size.
Create a JavaScript file in Data Dictionary/Scripts.
Check the JavaScript API
Something like this:
if (document != null && document.size > 0){
document.transformDocument("application/rtf");
}

Resources