Capturing the use of spreadsheets in the company

We have many custom spreadsheet solutions that are used, and we want some software ways to track them. Obviously, since these are spreadsheets, people can save them locally, rename them, etc. Therefore, we need a solution that can take this into account.

Some ideas:

  • In the open table, handle the OnOpen event and write a message to the database for tracking

The problems with this is where we store the database data. If the database does not work, we do not want the table to fall apart, etc.

Has anyone come up with a good spreadsheet inventory management solution that handles all of the above issues.

+3
source share
8 answers

I don’t understand the problem you are trying to solve here: you don’t need to register the use of spreadsheets as the end result, something is painful, and that is what you developed to try to fix it.

If you need reliable registration of all kinds of uses of spreadsheets, I don’t think this will work. If you need mostly reliable logging, just use the database and don't worry about (rare) cases when the database is down. On Error Resume Nextit should be enough for the spreadsheet to continue in this case.

, : , , , .

, , :

?

? ? ( ) ?

? ?

+3

excel -.

msinet.ocx Inet. ocx, - .

Inet -, .

+1

, , . "" , - , .

, SharePoint, , MOSS, Excel.

, . , , , .

, - , - , . , . , , , .

+1

, , , . , . , , , , , . , :

  • ,
  • , , , ,
  • excel
  • - > , , , , .

, . , tortoiseSVN, , . - , - ( ). , , , :

Subversion Windows

Tortoise Subversion

, - , , "on error resume next". :

  • DB
  • if, :

    if err.number = 3024 then
        msgbox "Database file not found, check network connection and retry"
        exit
    end if
    

:

VBA

+1

- , Excel. , - , "". :

ThisWorkbook:

Option Explicit

Private Sub Workbook_Open()
    Updater.CheckVersion
End Sub

( Updater)

Option Explicit

Const VersionURL = "http://yourServer/CurrentVersion.txt"
Const ChangesURL = "http://yourServer/Changelog.txt"
Const LatestVersionURL = "http://yourServer/YourTool.xlsm"

#If VBA7 Then
    Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
        (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
#Else
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
        (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
#End If


Public Sub CheckVersion()
    On Error GoTo fail
    Application.StatusBar = "Checking for newer version..."

    Dim ThisVersion As String, LatestVersion As String, VersionChanges As String
    ThisVersion = Range("CurrentVersion").Text
    If ThisVersion = vbNullString Then GoTo fail

    LatestVersion = FetchFile(VersionURL, , True)
    VersionChanges = FetchFile(ChangesURL, , True)
    If LatestVersion = vbNullString Then
        Application.StatusBar = "Version Check Failed!"
        Exit Sub
    Else
        If LatestVersion = ThisVersion Then
            Application.StatusBar = "Version Check: You are running the latest version!"
        Else
            Application.StatusBar = "Version Check: This tool is out of date!"
            If (MsgBox("You are not running the latest version of this tool. Your version is " & _
                ThisVersion & ", and the latest version is " & LatestVersion & vbNewLine & _
                vbNewLine & "Changes: " & VersionChanges & vbNewLine & _
                vbNewLine & "Click OK to visit the latest version download link.", vbOKCancel, _
                "Tool Out of Date Notification") = vbOK) Then
                ShellExecute 0, vbNullString, LatestVersionURL, vbNullString, vbNullString, vbNormalFocus
            End If
        End If
    End If
    Exit Sub
fail:
    On Error Resume Next
    Application.StatusBar = "Version Check Failed (" & Err.Description & ")"
End Sub

, , , URL- , , .

: -, , - , .

+1

. , . VBA (), .

, . , , , . , 100% - .

Financial Times, ​​ "Excel - , ad hoc ". .

+1

db, , -, .

0

. Samhain - . , -. , , (, ), .

0

Source: https://habr.com/ru/post/1708592/


All Articles