How to export TFS Shelveset comments to text or excel - excel

Can we export code review comments in a TFS Shelveset to an excel or any Text file.
I have attached this image. The comment in Red circle needs to be exported to excel or any Text file.
Reason- For audit purpose, need to track review comments being given to developer. Right now we have to manually enter these comments inside an excel code review sheet.
Please advise.

You could write a PowerShell script that queries the REST API see to get a particular shelveset, I would do a List first then a Get Shelveset change and try and get the full changes including the comments then you can save that to a txt file for you auditors. I haven't tried it so I don't know if comments are returned but I think so.

There is no built-in or documentary way to get the comments on the Shelvesets tab, but if you try to capture the network log, you would see you can get the comments using the following API:
Get http://TFS2018:8080/tfs/DefaultCollection/_apis/discussion/threads?artifactUri=vstfs%3A%2F%2F%2FVersionControl%2FShelveset%2F{CodeReviewName}%252526shelvesetOwner%25253D{ownername}

Related

Can I export comments from adobe to word/excel with hyperlinks?

I know how to export pdf comments which I can open it with notepad, but I cannot see hyperlinks (after clicking on comment pdf file is opened and I see on which page comment is) Is it possible to create something like that?
I have googled a lot and I cannot find my answer.
Thanks for help
Well I know its weird to answer my question but what I have done- I created content in word, exported to pdf, merged two pdfs together and I add links in my content.

How to have Excel to run VBA code saved in a text file?

Instead of having the VBA code saved in a module inside the Excel file, I would like to have the code saved in a text file, for example module1.vba. In Excel, module1.vba would be loaded or imported and run as it was a normal module.
Is that possible? How to do that?
In Excel, in the VBA editor, there is the option Insert > File... in the menu that does sort of what I want, but I don't know how to automate that with a minimal VBA code to load the real code saved as text.
Reason for this is to allow code revision control using text based applications like git.
--- edit ---
This answer shows a good alternative work around. However I'm still not too happy in duplicating things.
You can easily import a VBA file using a simple one-liner:
Application.VBE.ActiveVBProject.VBComponents.Import "C:\Path\To\File.bas"
This works with files exported from the VBA IDE, which include information like module name and other properties that can be configured on a per-module basis.
You need to enable Trust access to the VBA project object model for this to work. You can find that in the trust center settings, under Macro Settings.

Extracting a page from a pdf using a keyword

OK so im quite sure i cant do this with excel vb or for free even.
Im writing these macros for work, and one of them needs to be able to chose a pdf based on keywords.
Then go into the pdf, search either the titles of the pages or the text on the pages themselves using a different set of keywords.
When it finds the page that matches one of the keywords in the second set, it will extract the whole page, as is, to a single page pdf.
This can then be attached to email.
This will be only a small part of the purpose of the macro.
From what i understand, im probably going to have to find an SDK, pay for it, and write a separate program in C# or VisualBasic which is run when the macro needs.
I dont even need the code, maybe just a point in the right direction :D
In the end i got a program called pdftk.exe, free, and runs in command line.
With this i can export the Bookmarks listing to txtfile.
Search text file for string/keywords.
Jump down a line or two and grab associated page number.
Then use the same exe to extract that page and save as specific name, then my vba macro can grab that newly created 1 page pdf.
Ive seen code on this site for creating delays while another process is doing its thing, so i will try to implement that also.

Convert Google Docs to Jekyll Markdown

How can I convert a Google Docs, which contains images and tables, into a Markdown file which can be published as a post using Jekyll?
Is it possible to first export the Google Docs into a PDF and then convert the PDF to Markdown? What will happen to the images and tables in that case?
May 2018 Update
The script originally suggested in this answer appears to no longer work and has not been updated for 5 years.
An alternative solution (which is based on the old script) can be found at https://github.com/evbacher/gd2md-html
I tried it out, it works pretty well.
Previous Answer
You can use a Google Script to do the conversion for you!
This one will let you convert to .md and it will email you the converted file. I've tested it and works fine. It works with basic tables, and if you have images in the doc, it will attach them to the email.
Instructions for installing are on the same link, in the GitHub description, but I pasted it here for ease of access:
Add the script:
Open your Google Drive document (http://drive.google.com)
Tools ->
Script Manager > New
Select "Blank Project", then paste this code in
and save.
Clear the myFunction() default empty function and paste the
contents of converttomarkdown.gapps into the code editor
File -> Save
Run the script:
Tools > Script Manager
Select "ConvertToMarkdown" function.
Click Run
button (First run will require you to authorize it. Authorize and run
again)
Converted doc with images attached will be emailed to you.
Subject will be "[MARKDOWN_MAKER]...".
Good luck!
You can export as HTML. Jekyll can serve static HTML files.
Btw, "standard" markdown doesn't have tables. There are implementation that have it, but I'm afraid you'll have to convert them by hand to the right format, which will be implementation dependent. I don't know about Jekyll, maybe it's easiest to just use HTML tables within the markdown text.
You could create a new theme based on the HTML export. The export should contain the stylesheet embedded in a <style> tag within the HTML document. It's not really easy to create new themes, but doable. Or, if you just want the content and don't mind using whatever Jekyll theme you already have, then you can cut out the stylesheet part and keep the html only.
Another option would be to change how files are delimited in Excel on your computer. This guide can help you do that (http://www.howtogeek.com/howto/21456/export-or-save-excel-files-with-pipe-or-other-delimiters-instead-of-commas/)
Then every time you copy and paste from excel to a markdown file/jekyll you automatically have the pipes. All you will need to do is add some dashes to separate your topline..
Google Docs -> docx to Markdown -> md
I myself looked far and wide but I believe the best way to do this is by using Pandoc.
Works for all platforms (check their incredible website ) , what you are looking for is the following command on your cmd or PowerShell (Windows) :
pandoc input_filename.docx -s -o output.md
Pro Tip:
Pandoc comes with a little trick to store up even all of the images in your document to your custom folder and then adding the image tags in the markdown by using relative referencing to those images at the correct places. The amazing line of code is:
pandoc --extract-media ./your_custom_folder input_filename.docx -o output_filename.md

Removing password from Excel Document

Apologies if this is in the wrong site.
A while ago I placed a password onto my Excel document, and I have never looked at it again until recently and discovered that I can no longer remember the password. I have tried the following:
Entering VB code - However in order to be able to enter the VB code you must enter your password. This proved no such luck.
Zipping the file, and then un-zipping to gain access to the .xml file to edit the protection, this file, seemed just corrupt and contained an error within the xml / the xml did not show up when opening it in a XML editor.
I'm completely at a loss as to what I can actually do and this document is of importance and I need to edit it. Does anyone have any suggestions to what I can try in order to solve this?

Resources