Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Visualizzare Fattura elettronica e foglio stile

358 views
Skip to first unread message

Liones

unread,
Jan 5, 2019, 5:48:32 AM1/5/19
to
Fattura senza specifica foglio stile
Modifico la riga (foglio stile presente in cartella):

<?xml-stylesheet type="text/xsl" href="fatturaPA_v1.2.1.xsl"?>

Clicco direttamente sulla fattura e Explorer visualizza la fattura correttamente

Da form access lancio:
WebBrowser0.Navigate "D:\Users\Ottavio\Documents\FatturaXlsAccess\Dati\IT02470300373_425768.xml"

E visualizzo correttamente la fattura



“Stessa” fattura (IT02470300373_425768perAssoSoftware.xml) con
<?xml-stylesheet type="text/xsl" href="FoglioStileAssoSoftware.xsl"?>

E foglio stile presente in cartella

Clicco direttamente sulla fattura e Explorer visualizza la fattura correttamente

Da form access lancio:
WebBrowser0.Navigate "D:\Users\Ottavio\Documents\FatturaXlsAccess\Dati\ IT02470300373_425768perAssoSoftware.xmll"

E NON FUNZIONA

Impossibile visualizzare la pagina XML
Impossibile visualizzare l'input XML tramite il foglio di stile XSL. Correggere l'errore, quindi fare clic su Aggiorna oppure riprovare in un momento successivo.
________________________________________
Accesso negato. Errore durante l'elaborazione della risorsa "file:///D:/Users/PIPPOTAPPO/Documents/FatturaXlsAccess/dati/Fogli...

SOLUZIONI?

Perché cliccando direttamente sul file funge e da access no?


Stesso problema con procedura simile su c#


Grazie per l'aiuto

Liones

unread,
Jan 5, 2019, 5:52:41 AM1/5/19
to
aggiungo

È possibile forzare una visualizzazione con uno specifico foglio stile senza modificare la fattura?

(assosoftware come fa?)

RobertoA

unread,
Jan 5, 2019, 5:59:46 AM1/5/19
to
Hai visto che da Access stai usando un .xmll ?
(con la oppia L)

Liones

unread,
Jan 5, 2019, 6:04:32 AM1/5/19
to

> Hai visto che da Access stai usando un .xmll ?
> (con la oppia L)

"purtroppo" nel codice è scritto giusto (e non funziona :<( )

Liones

unread,
Jan 5, 2019, 3:18:16 PM1/5/19
to
ho (parzialmente) risolto (copiato) in c#:

// Generating a temporary HTML file
string outfile = Path.GetTempFileName().Replace(".tmp", ".html");

// Creating the XslCompiledTransform object
XslCompiledTransform transform = new XslCompiledTransform();

// Loading the stylesheet file from the textbox
transform.Load(@strPath + "\\Dati\\FoglioStileAssoSoftware.xsl");

// Transforming the XML file and storing output in HTML file
transform.Transform(@strPath + "\\Dati\\IT02470300373.xml", outfile);

// Displaying transformed output on a webbrowser control
webBrowser1.Navigate(outfile);

Liones

unread,
Jan 5, 2019, 3:52:09 PM1/5/19
to

shado

unread,
Jan 6, 2019, 4:13:47 AM1/6/19
to
provate questo.

Public Sub Transform(sourceFile, stylesheetFile, resultFile)

Dim source As New MSXML2.DOMDocument60
Dim stylesheet As New MSXML2.DOMDocument60
' Dim result As New MSXML2.DOMDocument60

Dim pth As String

pth = CurrentProject.Path & "\"

' Load data.
source.async = False
source.Load pth & sourceFile '"\fat.xml"

' Load style sheet.
stylesheet.async = False
stylesheet.Load pth & stylesheetFile '"\fogliositle.xsl"

If (source.parseError.errorCode <> 0) Then
MsgBox ("Error loading source document: " & source.parseError.reason)
Else
If (stylesheet.parseError.errorCode <> 0) Then
MsgBox ("Error loading stylesheet document: " & stylesheet.parseError.reason)
Else
' Do the transform.

' source.transformNodeToObject stylesheet, result

Open pth & resultFile For Output As 1
Print #1, source.transformNode(stylesheet)
Close 1
' result.Save pth & resultFile '"\out.htm"
End If
End If

End Sub

Private Sub Comando0_Click()
Transform "fat.xml", "a.xsl", "out.htm"
End Sub

Liones

unread,
Jan 6, 2019, 9:35:50 AM1/6/19
to
Il giorno domenica 6 gennaio 2019 10:13:47 UTC+1, shado ha scritto:
> provate questo.
...

perfetto così funziona (crea il file .htm che poi visualizzo)




(hai idea del perchè cambiando il foglio stile WebBrowser0.Navigate non visualizza correttamente ? codice "mio sopra")

0 new messages