Git Product home page Git Product logo

vbasync's People

Contributors

chelh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vbasync's Issues

Compiled version of VBASync

Hello!

I wish I could try your utility, but I don't have VS or any other C# compiler installed.
Could you also please publish a pre-built executable file for the tool?

Thanks!

Error "Object reference not set to an instance of an object" then crash if Office file is opened

Hello,

I was testing your software this evening, and found a bug (using version 1.1.4). Here is the scenario:
I created a XLSM file containing a Module, a class and a UserForm (with a button). On scenario start, the XLSM file is opened.

  • Extract the VBA content to a folder
  • Modify the module using a text editor
  • Refresh then publish the changes (while the XLSM file is open). You get the error message
  • Then, close Excel instance and click on "Refresh". The program stops.

If you're unable to reproduce the problem, I'll be able to provide my sample XLSM file.

Option: ignore worksheets and modules with no VBA Code

Hi chelh,

Another idea, related with issue 24, I would find useful to be able to ignore files without VBA code in them (as an option in settings panel), in the Office File, and in the Source Folder. As a side-benefit, the list of extracted files would be smaller to the only necessary files.

What do you think?

Issue while extracting from Office file

I have a Word template containing some forms in my .dotm file.
I have extracted my .dotm file into a folder from which I am committing the code to SVN.

When I make changes to the code for the form, I am able to successfully extract the '.frm' files with the code.
However, when I make any UI changes in a form, and try to extract them, I am getting an error as shown in the screenshot.
Error: 'File name cannot be null. Parameter name: sourceFileName'

I had to extract the template to a different folder to get around this issue temporarily.

p.s. I feel the buttons 'Apply' and 'OK' may not be correctly named, as both of them extract the files from the template. I happen to keep the tool open to extract multiple times while I am coding.

issue

Differentiate extract/publish Office document

Hi anew,

Would it be possible to differentiate the extracted and the published office document. And even a root "template" office document.

That's to say for example that we conceive the office document in a working directory c:\whatever\work.
That the source code repo is in another directory c:\src\awesomeprojectrepo.
And finally, as we do not want any change in the styles of the document happening during the "conceive" phase, we'd like that the publish starts from a "template" office document (note also that this document may or may not already contains the vba content).

So we'd have 3 files and 4directories
c:\whatever\work\source.doc -> the source document to extract from
c:\src\awesomeprojectrepo\bin\target.doc -> the target document to publish to
c:\src\awesomeprojectrepo\src\ -> the source/target directory to extract-to/publish-from (including the ini file)
c:\src\awesomeprojectrepo\template\template.doc -> the root template document to publish from

Thx

Sequence does not contain any elements when Class name case does not match

For some reason if the BIFF file name case does not match the declared file name, the following code in VbaFolder.cs throws an exception

case "CLASS":
     modules.First(m => m.Name == split[1]).Type = ModuleType.Class;

This can be remedied by uppercasing everything, or doing a case insensitive match

Linux-compatible command-line version

Please comment or emote here if you'd like me to find some way to get VBA Sync Tool working as a command-line executable under Linux, in addition to the normal Windows GUI. I've tried a couple of approaches already, and would like to gauge the actual level of interest in this before pursuing it further.

Command line extract/publish

It would be useful to have a command line version that can be run from a batch file. Extraction can ignore diffs by default as we are expecting to extract into a version-controlled folder. The publish can be like a compile step, merging the source files into a binary file.

Deal with Office's random-byte padding of strings

With many VBA form–containing Office files, each time the Office file is saved, VBA Sync Tool generates a slightly different .frx file, even if the form design doesn't actually change. Inspection with a hex editor suggests that when Office embeds the .frx data into the file, for each control name that it writes, it inserts some uninitialized bytes to make the next field align to a 4-byte boundary. VBA Sync Tool needs to compensate for this by overwriting the padding bytes to null.

When you load a session, if file or folder doesn't exist, alert user and disable some functions

Hi chelh,

I noticed that if you load a session, and file or folder doesn't exist anymore, there is no alert to the user (maybe apply would display a message, I didn't test).
I would suggest something like this:
displayfileorfoldermissing

  • Disable Apply, make sure "OK" perform only the "Quit" part of "Apply+Quit" (or disable OK as well). Optionally, Refresh and the ListView could be disabled as well.

The ListView kept the list from previous session, so depending on your implementation, there might be a risk to publish or extract files from previous session instead.

Thanks!

Publish to xlsm

This does not seem to work. the list of files does not show up from folder.
Upon refresh get the error as below
"Error reading 'f' stream in .frx data; expected cbForm size 48, but actual size was 68.

Publish to .xlsm isn't working

Hello Chelsea!

First of all, great idea with VBASync, and thanks for sharing it with us! :)

My Issue

I recently downloaded and compiled VBASync under VS2015 -- I'm not using C# 7.0, so had to make some changes around properties with "=>" and TryParse(..., out var s). My changes are purely around the syntax of C# 7.0, so no scope or logic has been changed.

I'm able to extract out VBA code from a test spreadsheet (simple HelloWorld function in a module), but not able to push back any changes -- I can see that the timestamp of the spreadsheet changes, so VBASync is writing changes to the spreadsheet. Clicking on the Refresh button on the VBASync gui, will show that there are changes to the module.

I've attached the solution with my changes.
vbasync.zip

Can you take a look to see what's going on?

Many thanks!
simon

PS. Some unit and integration tests would be great

Splitting VS Project

I also would suggest that you split VBASync project. I envision a splitting in 3:

  • One library to read vba project, with reader and vba project's object model
  • Another library with the vba project diff
  • And finally the VBASync itself

And as the libraries could be uses not only in VBASync, we also could imagine creating another repo...

Best regards.

BB

Prevent publishing code to worksheets that don't exist

Hi chelh,

I work with several versions of files, with different worksheets, and same VBA code. I published a worksheet that didn't exist in the Office file. It gives the following result:
publishtomissingworksheets

You can notice the icon related to Feuil4, and the (Name) property that doesn't match (actually, it is "ThisWorkbook"), and the worksheet can't be deleted.

Thanks!

Support subdirectories

Hi chelh,

Thx for this wonderfull tool. I did the same in the lame way using automation :-( . You win by KO ;-) .

What I think would be usefull for everyone is to support subdirectories in the extract/publish directory. That is to say, that in our office project we have tens of modules classes and forms. So It would be nice to kinda sort them in the subdirectories Modules, Classes, Forms (or other as any user would want).

So when extracting/publishing VBASync would scan the subdirectories of the project directory and try to find the equivalent file to be extracted/published.

For instance, at the first extraction VBASync would extract everything in the root directory. So then the user will reorganize the files as he wants. And then VBASync would respect the arrangement done by the user.

Thx again.

Refresh synchronization after Extract or Publish

Hi chelh,

I saw a few issues about publish problems (already fixed). If after an extract or publish, you refresh the list - not as it "should be", but using the standard refresh - without selecting any item, I think you'll get the same result in most cases, but if some new extract/publish issue appears, then the user will see that as an extract or publish problem.

What do you think?

Language selected on first launch not taken into account

Hi chelh,

With the following scenario, language is not correctly taken into account:

  • First launch of VBASync, portable version
  • Keep all options as default, and click Apply, then OK
  • Quit VBASync with the cross button

The LastSession.ini file is as follow
LastSession.ini.txt

You can see that Language field is empty.
As a result, on my french OS, when I wanted to keep "english" for screenshots, the default french language was used.

=> Maybe, if possible, set the Language value as the OS language if available (but definitely not mandatory)

Thank you very much, and sorry for reporting so many issues today :-)

WPF GUI sometimes doesn't obey cherry-picking

Hi there,

So the good news is v.2.0 kicks a**! It's publishes and extract's VBA to the SVN.

However, since v2.0 I noticed that publishing will something delete VBA script from the SVN, even though I've cleared deselected that I didn't want files deleted. Same for extracting, files will disappear from the SVN randomly. Not sure if it's settings (checkbox) not being propagated, or mismatch on matching up the SVN files to the ones on the Excel/Office file.

Let me know if you need me to run some test cases :)

Thanks again for this great tool, I'm contemplating installing VS to help debug/code!

GistThat integration

First, thanks @chelh for such a fantastic tool, I use VBASync almost daily!

This is a feature request to integrate "GistThat" by @brucemcpherson into VBASync.

I totally understand if this is beyond the scope of what you are interested in including, it just seems like a natural fit with VBASync. VBASync already has the entire framework for extracting and updating code, this would just add the capability to pull updates from GitHubGist snippits to keep reusable VBA code up to date.

GistThat requires that Excel trust settings be modified and also runs from within Excel, both of which VBASync masterfully does not . VBASync could perform the same function that the GistThat bootstrap code in gistThat_.vba does, or even just a subset of it would be very useful.

Thanks for the consideration!
-Van

Chinese garbled

this tool is work,but Chinese garbled
how to change? help me!

Improvement: List of recently stored sessions

Another idea for improvement:
That would be even more user friendly to have access of recently stored sessions from the "File" menu (5 last stored sessions for example).

I'm pretty sure there is a workaround using the new command line options of 1.2.0 and windows shortcuts, but I will surely take advantage of that new feature.

Thanks!

"Error reading 'o' stream in .frx data" after the first export

  • Export a form
  • Reopen VBASync
  • "Refresh"
  • Error message box:
 ---------------------------
VBA Sync Tool
---------------------------
Error reading 'o' stream in .frx data: expected cbArrayString size 164, but saw 84 bytes as read.
---------------------------
ОК   
---------------------------

Maybe this has something to do with national characters in paths and/or in form properties.

This is a critical bug since the utility can't proceed any further.

Improvement: LastSession.ini in Application folder for Portable version

Hello chelh,

Thanks for the portable version of 1.2.0. The version even solved another issue I didn't have time to report. I would ask for an extra improvement for the portable version, so that it really becomes a portable version (without extra data outside the current application folder).

Let me know if this can be done without too much troubles.

Options not saved

Hello,

Tested on version 1.1.6b (and 1.1.4), if I specify a diff tool and close VBASync, then the options are empty again when I start VBASync again.

Input string was not in a correct format

I successfully installed VBA Sync and managed to get the first commit into git.
But when I try again, I'm getting an "Input string was not in correct format" error message.
Both my VBA code and the xlsm are currently under version control.

vbasyncerror

Manage relative path in recent items

Hello chelh,

Now that you almost fixed my last enhancement request, I thought of another one ^^. I would use a setting to save recent list item as relative path (relative from the application folder).

Ideally, that would manage relative path like ..\Sessions\SessionFile.ini (if the file is located in a folder next to the VBASync folder), or just relative folder from the application folder (like SessionFile.ini or Sessions\SessionFile.ini for a file located in a subfolder named Sessions). In short, that's the DOS way to define relative path.

You could either specify an option (in VBASync.ini file for example), or detect if the folder is relative or not (better if possible ^^).

And thanks again, you're always pretty efficient in taking my requests into account

OLE error at "next" extraction

Hey,

New problem when extracting twice in a row:
image
At the beginning there's nothing in the extract directory, so everything is extracted correctly. The second times the extracted files are already in the directory as we just extracted them, and we get this error message.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.